Browse Source

a

master
Andrey Kovalev 3 years ago
parent
commit
8b4fb6a449
Signed by: Russia9
GPG Key ID: EC3AA65373CA51DC
  1. 23
      Dockerfile

23
Dockerfile

@ -1,24 +1,13 @@
# Build container FROM golang:1.18
FROM golang:1.18-bullseye AS build
# Set build workdir # Set app workdir
WORKDIR /app WORKDIR /go/src/app
# Copy app sources # Copy application sources
COPY . . COPY . .
# Build app # Build app
RUN go build -o bin . RUN go build -o app .
# ---
# Production container
FROM debian:bullseye-slim
# Set app workdir
WORKDIR /app
# Copy binary
COPY --from=build /app/bin .
# Run app # Run app
CMD ["./bin"] CMD ["./app"]
Loading…
Cancel
Save