Last active
February 13, 2020 11:50
-
-
Save ereshzealous/0245426152193a0de6e373b892dfb89d 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 the latest golang base image | |
FROM golang:alpine | |
RUN GOCACHE=OFF | |
RUN go env -w GOPRIVATE=github.com/ereshzealous | |
# Set the Current Working Directory inside the container | |
WORKDIR /app | |
# Copy everything from the current directory to the Working Directory inside the container | |
COPY . . | |
RUN apk add git | |
RUN git config --global url."https://golang:<access-token>@github.com".insteadOf "https://github.com" | |
# Build the Go app | |
RUN go build -o main . | |
# Expose port 8080 to the outside world | |
EXPOSE 8080 | |
#ENTRYPOINT ["/app"] | |
# Command to run the executable | |
CMD ["./main"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment