1
0
forked from baron/baron-sso
Files
baron-sso/backend/Dockerfile
2025-12-23 17:59:37 +09:00

22 lines
397 B
Docker

FROM golang:1.25-alpine
WORKDIR /app
# Install git for go mod download if needed
RUN apk add --no-cache git
# Pre-copy go.mod/sum to cache dependencies
COPY go.mod go.sum ./
RUN go mod download
# Copy source
COPY . .
# Build for production (optional, can just run go run for dev)
RUN go build -o main ./cmd/server
EXPOSE 3000
# Default command (can be overridden by compose)
CMD ["./main"]