Last active
September 18, 2021 06:01
-
-
Save percybolmer/1b3da00eafcff255b2c692bb90f82923 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . | |
EXPOSE ${PORT} | |
CMD [ "/app/helloer" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment