Last active
October 10, 2024 15:23
-
-
Save jrussellsmyth/97d8b77adb9307d1c9d2f4785056d21b to your computer and use it in GitHub Desktop.
service to include in a docker compose file to create a devcontainer for go development
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
| go-service: | |
| image: mcr.microsoft.com/devcontainers/go:1.22-bookworm | |
| deploy: | |
| resources: | |
| limits: | |
| cpus: '2' | |
| memory: 2G | |
| reservations: | |
| cpus: '2' | |
| memory: 2G | |
| init: true | |
| shm_size: '1gb' | |
| # environment: | |
| # - "ENV VARS HERE" | |
| # ALLOW FOR PTRACE DEBUGGER | |
| cap_add: | |
| - SYS_PTRACE | |
| security_opt: | |
| - seccomp:unconfined | |
| # depends_on: | |
| # Overrides default command so things don't shut down after the process ends. | |
| command: /bin/sh -c "while sleep 1000; do :; done" | |
| volumes: | |
| - $PWD:$PWD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment