Created
April 22, 2020 16:55
-
-
Save Daniel1984/43b90bb48f9aa5ad06845f903ef761b9 to your computer and use it in GitHub Desktop.
This file contains 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
# Start from golang v1.13.4 base image to have access to go modules | |
FROM golang:1.13.4 | |
# create a working directory | |
WORKDIR /app | |
# Fetch dependencies on separate layer as they are less likely to | |
# change on every build and will therefore be cached for speeding | |
# up the next build | |
COPY ./go.mod ./go.sum ./ | |
RUN go mod download | |
# copy source from the host to the working directory inside | |
# the container | |
COPY . . | |
# This container exposes port 7777 to the outside world | |
EXPOSE 7777 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment