Files
devops-directive-docker-course/04-building-container-images/sample-app/api-golang/Dockerfile.2
2023-01-25 17:55:51 -05:00

15 lines
251 B
Docker

# Pin specific version for stability
# Use alpine for reduced image size
FROM golang:1.19-alpine
WORKDIR /app
COPY . .
RUN go mod download
# Compile application during build rather than at runtime
RUN go build -o api-golang
CMD ["./api-golang"]