You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
308 B

3 years ago
# Build container
3 years ago
FROM golang:1.18-bullseye AS build
3 years ago
# Set build workdir
WORKDIR /app
# Copy app sources
COPY . .
# Build app
RUN go build -o app .
# ---
# Production container
FROM debian:bullseye-slim
# Set app workdir
WORKDIR /app
# Copy binary
COPY --from=build /app/app .
# Run app
CMD ["./app"]