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 0000000000000000000000000000000000000000..46122e346a43255c78d40f783af74d3d752208aa --- /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