Created
February 4, 2022 08:46
-
-
Save xerardoo/0df728e1f3b71e187a4dac5a816a79ad to your computer and use it in GitHub Desktop.
Dockerfile for Golang API Project
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
# Credits: https://nizu.tech/go-blog-1 | |
FROM golang:alpine | |
RUN mkdir /app | |
WORKDIR /app | |
ADD go.mod . | |
ADD go.sum . | |
RUN go mod download | |
ADD . . | |
RUN go get github.com/githubnemo/CompileDaemon | |
EXPOSE 8000 | |
ENTRYPOINT CompileDaemon --build="go build main.go" --command=./main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment