Browse Source

dockerfile

master
Andrey Kovalev 3 years ago
parent
commit
71d599d400
Signed by: Russia9
GPG Key ID: EC3AA65373CA51DC
  1. 21
      Dockerfile

21
Dockerfile

@ -1,24 +1,13 @@ @@ -1,24 +1,13 @@
# Build container
FROM golang:1.18-bullseye AS build
FROM golang:1.18
# Set build workdir
WORKDIR /app
# Set app workdir
WORKDIR /go/src/app
# Copy app sources
# Copy application 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"]
CMD ["./app"]
Loading…
Cancel
Save