SO post for this: https://stackoverflow.com/questions/74866875/trying-to-use-devcontainers-with-a-docker-compose-file-immediately-fails
- VSCode Version: 1.73.1
- Local OS Version: Darwin macbookpro306.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64 arm Darwin
- Remote Extension/Connection Type: devcontainer with compose
Steps to Reproduce:
- Use a compose file
- Fail
I'm opening as a bug because I can't even figure out where error logging is going. I know compose works, but I have no way of knowing why my setup is not working because there is no useful error info.
I get this error immediately: Command 'Dev Containers: Rebuild and Reopen in Container' resulted in an error (Command failed: /private/var/folders/vw/m_7gmll54yb0cnfp687dxh740000gq/T/AppTranslocation/1485CA8A-FFAA-4796-BA55-5928911F8CB3/d/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/me/.vscode/extensions/ms-vscode-remote.remote-containers-0.266.1/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/me/myfolder/myproject --log-level debug --log-format json --config /Users/me/myfolder/myproject/.devcontainer/devcontainer.json --include-merged-configuration --mount-workspace-git-root true)
Is my devcontainer config wrong? Is my compose file wrong? What compose command is it even running? Where do I go to use useful error information so I can troubleshot without 100% guess work? Looks like my container config might be wrong?
Building and running with compose works without issues. Does my compose service need to be setup with an entrypoint that keeps it running?
Below are my configs
// container config
{
"name": "Python 3",
"dockerComposeFile": [
"../docker-compose.yml"
],
"service": "devcontainer_testenv",
"workspaceFolder": "/app",
"shutdownAction": "stopCompose"
}
# compose file
version: "3.9"
services:
devcontainer_toolset:
platform: linux/amd64
image: gcr.io/${PROJECT}/${IMAGE_NAME}:devcontainer_toolset
build:
context: .
dockerfile: "Dockerfile.toolset"
# Use official vscode dev container image
args:
RUNTIME_IMAGE: mcr.microsoft.com/devcontainers/python:0-3-bullseye
devcontainer_testenv:
platform: linux/amd64
image: gcr.io/${PROJECT}/${IMAGE_NAME}:devcontainer_testenv
depends_on:
- devcontainer_toolset
build:
context: .
dockerfile: "Dockerfile.testenv"
# Use toolset build from devcontainer image
args:
RUNTIME_IMAGE: gcr.io/${PROJECT}/${IMAGE_NAME}:devcontainer_toolset
secrets:
- pypi_conf
volumes:
- "${HOME}/.aws/credentials:/root/.aws/credentials"
- "${HOME}/.config/gcloud:/tmp/.config/gcloud"
secrets:
pypi_conf:
file: "${HOME}/.config/pip/pip.conf"
SO post for this: https://stackoverflow.com/questions/74866875/trying-to-use-devcontainers-with-a-docker-compose-file-immediately-fails
Steps to Reproduce:
I'm opening as a bug because I can't even figure out where error logging is going. I know compose works, but I have no way of knowing why my setup is not working because there is no useful error info.
I get this error immediately:
Command 'Dev Containers: Rebuild and Reopen in Container' resulted in an error (Command failed: /private/var/folders/vw/m_7gmll54yb0cnfp687dxh740000gq/T/AppTranslocation/1485CA8A-FFAA-4796-BA55-5928911F8CB3/d/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/me/.vscode/extensions/ms-vscode-remote.remote-containers-0.266.1/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/me/myfolder/myproject --log-level debug --log-format json --config /Users/me/myfolder/myproject/.devcontainer/devcontainer.json --include-merged-configuration --mount-workspace-git-root true)Is my devcontainer config wrong? Is my compose file wrong? What compose command is it even running? Where do I go to use useful error information so I can troubleshot without 100% guess work? Looks like my container config might be wrong?
Building and running with compose works without issues. Does my compose service need to be setup with an entrypoint that keeps it running?
Below are my configs