From 00e7b199061433a8e25fab904cd0ab3a79f8821e Mon Sep 17 00:00:00 2001 From: Russia9 Date: Thu, 14 Apr 2022 01:57:29 +0300 Subject: [PATCH] dockerfile --- Dockerfile | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7db75b..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 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"] \ No newline at end of file