From b9c994a9a12902d03c43d41a4a26bfc641dd0473 Mon Sep 17 00:00:00 2001 From: tgs266 <siegel.tucker@gmail.com> Date: Fri, 24 Sep 2021 18:41:51 -0400 Subject: [PATCH] two dockerfiles --- Dockerfile => Dockerfile.dev | 0 Dockerfile.prod | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) rename Dockerfile => Dockerfile.dev (100%) create mode 100644 Dockerfile.prod diff --git a/Dockerfile b/Dockerfile.dev similarity index 100% rename from Dockerfile rename to Dockerfile.dev diff --git a/Dockerfile.prod b/Dockerfile.prod new file mode 100644 index 0000000..46122e3 --- /dev/null +++ b/Dockerfile.prod @@ -0,0 +1,18 @@ +FROM golang:1.16.8-bullseye +## We create an /app directory within our +## image that will hold our application source +## files +RUN mkdir /app +## We copy everything in the root directory +## into our /app directory +ADD . /app +## We specify that we now wish to execute +## any further commands inside our /app +## directory +WORKDIR /app +## we run go build to compile the binary +## executable of our Go program +RUN go build -o main . +## Our start command which kicks off +## our newly created binary executable +CMD ["/app/main -env=prod"] \ No newline at end of file -- GitLab