Last active
August 4, 2019 19:02
-
-
Save adiachenko/51ee331cce0d1acb07edbe52819d25ca to your computer and use it in GitHub Desktop.
Docker Compose for Go services in development
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
version: '3.7' | |
services: | |
app: | |
command: tail -f /dev/null | |
image: golang:1.12.6-stretch | |
ports: | |
- 8000:8000 | |
volumes: | |
# This is go modules cache, without it you will have to | |
# re-download all dependencies after restarting container | |
- modules:/go/pkg/mod/cache | |
- ./:/code:cached | |
working_dir: /code | |
volumes: | |
modules: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment