Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. FROM golang
  2.  
  3. ARG app_env
  4. ENV APP_ENV $app_env
  5.  
  6. # it is okay to leave user/GoDoRP as long as you do not want to share code with other libraries
  7. COPY . /go/src/github.com/user/GoDoRP/api
  8. WORKDIR /go/src/github.com/user/GoDoRP/api
  9.  
  10. # added vendor services will need to be included here
  11. RUN go get ./vendor/database
  12.  
  13. RUN go get ./
  14. RUN go build
  15.  
  16. # if dev setting will use pilu/fresh for code reloading via docker-compose volume sharing with local machine
  17. # if production setting will build binary
  18. CMD if [ ${APP_ENV} = production ]; \
  19. then \
  20. api; \
  21. else \
  22. go get github.com/pilu/fresh && \
  23. fresh; \
  24. fi
  25.  
  26. EXPOSE 8080
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement