docker and workflow

This commit is contained in:
Gabe Farrell 2026-01-21 23:13:47 -05:00
parent 656b5fd9c5
commit e60b83ebc8
3 changed files with 63 additions and 1 deletions

27
Dockerfile Normal file
View file

@ -0,0 +1,27 @@
# Stage 1: Build Go binary using lightweight Alpine
FROM golang:1.24-alpine AS builder
# Set workdir
WORKDIR /app
# Copy go.mod/go.sum and download dependencies
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build Go binary
RUN GOOS=linux go build -o koito-multi-proxy .
# Stage 2: Runtime on Ubuntu 24.04
FROM ubuntu:24.04
# Avoid interactive prompts during apt installs
ENV DEBIAN_FRONTEND=noninteractive
# Copy Go binary from builder stage
COPY --from=builder /app/koito-multi-proxy /usr/local/bin/koito-multi-proxy
# Entrypoint
ENTRYPOINT ["koito-multi-proxy"]