Created
June 11, 2018 23:44
-
-
Save ujjkumsi/592e087b9fcb307f9751ba58519aa70f 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 | |
ARG app_env | |
ENV APP_ENV $app_env | |
COPY ./app /go/src/github.com/ujjkumsi/docker-go/app | |
COPY ./best-practices /go/src/github.com/ujjkumsi/docker-go/best-practices | |
COPY ./models /go/src/github.com/ujjkumsi/docker-go/models | |
COPY ./dao /go/src/github.com/ujjkumsi/docker-go/dao | |
COPY ./dao /go/src/github.com/ujjkumsi/docker-go/util | |
COPY ./dao /go/src/github.com/ujjkumsi/docker-go/dialogflow | |
WORKDIR /go/src/github.com/ujjkumsi/docker-go/app | |
RUN go get ./ | |
RUN go build | |
CMD if [ ${APP_ENV} = production ]; \ | |
then \ | |
app; \ | |
else \ | |
go get github.com/pilu/fresh && \ | |
fresh; \ | |
fi | |
EXPOSE 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment