refactor: split docker install with env

This commit is contained in:
Danny Avila 2024-06-30 17:22:53 -04:00
parent 104dc9a08e
commit a950f57ee6
No known key found for this signature in database
GPG key ID: 2DD9CC89B9B50364
4 changed files with 33 additions and 21 deletions

View file

@ -5,17 +5,19 @@
"workspaceFolder": "/workspaces",
"customizations": {
"vscode": {
"extensions": ["ms-azuretools.vscode-docker"],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash"
}
"extensions": ["ms-azuretools.vscode-docker"]
}
},
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y docker.io docker-compose",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"moby": true,
"dockerDashComposeVersion": "v2"
}
},
"remoteUser": "vscode",
"forwardPorts": [3080, 27017, 7700]
"postCreateCommand": "sudo chown -R vscode:vscode /workspaces && if [ \"$CODESPACES\" = \"true\" ]; then sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin; fi",
"remoteEnv": {
"INSTALL_DOCKER": "${localEnv:INSTALL_DOCKER:false}"
}
}