From 8b4fb6a449ebaa686e97dc2ac523e535dc6e6fbf Mon Sep 17 00:00:00 2001 From: Russia9 Date: Thu, 14 Apr 2022 02:09:54 +0300 Subject: [PATCH] a --- Dockerfile | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb1b44f..8094e41 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 bin . - -# --- -# Production container -FROM debian:bullseye-slim - -# Set app workdir -WORKDIR /app - -# Copy binary -COPY --from=build /app/bin . +RUN go build -o app . # Run app -CMD ["./bin"] +CMD ["./app"] \ No newline at end of file