slack-auth-1770277926/services/auth-api/Dockerfile
jordan 187c4f38d3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Add service component: auth-api
2026-02-05 07:52:13 +00:00

34 lines
714 B
Docker

# Build stage
FROM golang:1.23-alpine AS builder
RUN apk add --no-cache git
# Configure Go workspace and private modules
ENV GOPRIVATE=git.threesix.ai/*
ENV GOWORK=/app/go.work
WORKDIR /app
# Copy go workspace and all source (workspace deps are local)
# Note: go.work.sum may not exist if no external dependencies have been synced yet
COPY go.work ./
COPY go.work.su[m] ./
COPY pkg/ ./pkg/
COPY services/auth-api/ ./services/auth-api/
# Build from workspace root
RUN CGO_ENABLED=0 go build -o /auth-api ./services/auth-api/cmd/server
# Production stage
FROM alpine:3.19
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /
COPY --from=builder /auth-api /auth-api
EXPOSE 8001
ENTRYPOINT ["/auth-api"]