Skip to content

Instantly share code, notes, and snippets.

@adiachenko
Last active August 4, 2019 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adiachenko/51ee331cce0d1acb07edbe52819d25ca to your computer and use it in GitHub Desktop.
Save adiachenko/51ee331cce0d1acb07edbe52819d25ca to your computer and use it in GitHub Desktop.
Docker Compose for Go services in development
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