Created
August 14, 2024 18:21
-
-
Save TechnotronicOz/dcbda31076cb3e0035d4227852f86b9e 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
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | |
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node | |
{ | |
// Basic container setup | |
"name": "Mono-Repo Dev Container Node.js", | |
// Building the container | |
"build": { | |
"dockerfile": "Dockerfile", | |
// Update 'VARIANT' to pick a Node version: 18, 16, 14. | |
// Append -bullseye or -buster to pin to an OS version. | |
// Use -bullseye variants on local arm64/Apple Silicon. | |
"args": { "VARIANT": "16-bullseye" } | |
}, | |
// Features to add to the dev container | |
"features": { | |
"docker-in-docker": { | |
"version": "latest", | |
"moby": true, | |
"dockerDashComposeVersion": "v1" | |
} | |
}, | |
// Port forwarding configuration | |
"forwardPorts": [3000, 80, 8080, 8126], | |
// User configuration | |
"remoteUser": "node", | |
// Mounts configuration | |
"mounts": [ | |
"source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume", | |
"source=/var/run/docker.sock,target=/var/run/docker-host.sock,type=bind" | |
], | |
// Post-create commands | |
"postCreateCommand": "./.devcontainer/postCreateCommand.sh", | |
// Additional run arguments | |
"runArgs": ["--init", "--privileged", "--network=host"], | |
// Override command configuration | |
"overrideCommand": false | |
// Uncomment and configure the following sections as needed | |
// Configure tool-specific properties. | |
// "customizations": {}, | |
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | |
//"remoteUser": "root" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment