Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Last active September 18, 2021 06:00
Show Gist options
  • Save percybolmer/d399e675f6cff23ca788d767110ecae3 to your computer and use it in GitHub Desktop.
Save percybolmer/d399e675f6cff23ca788d767110ecae3 to your computer and use it in GitHub Desktop.
FROM golang:1.5
LABEL maintainer="PercyBolmer@medium"
#ARG is used during the Image build
ARG port=8080
# Assign Environment variabel PORT the value of port. The user running the container can then override this with the -e flag
ENV PORT=${port}
RUN mkdir /app
COPY main.go /app
WORKDIR /app
RUN go build -o helloer .
CMD [ "/app/helloer" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment