Closed cpoptic closed 1 year ago
There appear to be two networks with the same name, please check with docker network ls
.
To resolve the issue, you can remove one or both of them with docker network rm <ids>
(see https://stackoverflow.com/questions/63776518/error-2-matches-found-based-on-name-network-nameofservice-default-is-ambiguo).
Not sure why two networks of the same name were created.
On "Recovery Container": That's a temporary dev container using a built-in configuration, so you can fix your configuration. (Though in this case the problem is not with your configuration.)
On "Create Dev Container": This command creates an empty dev container not containing your repository. We could make this clearer in the UI. Needs more thinking and feedback.
Does that help?
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
I'm using the latest version of VS Code with the latest Dev Containers extension installed.
Trying to create a dev container by cloning from a public Github repo.
But I get an error:
An error occurred setting up the container.
Retrying doesn't fix the issue. But choosing "Edit devcontainer.json in Recovery Container" does indeed open the remote dev container "correctly", albeit with the green "Recovery Container" in the lower left corner.
The repo doesn't have a .devcontainer folder so VS Code creates one, along with a Dockerfile and devcontainer.json file.
There were several options for which base image to use for Python (e.g. Anaconda, Miniconda, Miniconda+PostgreSQL, etc), but I just used the "Miniconda (Python 3) & PostgreSQL" since this project uses PostgreSQL and Python.
The contents of the devcontainer.json are this:
and the newly created Dockerfile is just 2 lines:
What's strange is that I get an error message after the recovery container opens:
This is a recovery container that allows you to edit your Dockerfile. Use 'Reopen in Container' to retry.
That error message seems to imply there's something wrong with the Dockerfile, but I've not modified it at all; just using the stock Dockerfile that VS Code created in the .devcontainer folder.
When I click the lower left green "Recovery Container" to "Create Dev Container",
I choose the simple Alpine container with Git installed (because frankly I'm not really sure which Dev Container config I should choose):
It then Opens Remote and starts the Dev Container
What's going on here? Is there an error in the Dockerfile or in the devcontainer.json file? Or something else entirely?
I'm just trying to create a Dev Container from a Github repo, save it, and be able to reopen that Dev Container later to resume working on that project.
I have log files but honestly I'm not sure which are the relevant parts of the log file to include, so here's all ~300 lines:
LOG FILE CONTENTS BELOW:
[2022-12-09T16:58:46.728Z] Start: Run: docker run -d --mount type=volume,src=vsc-remote-containers,dst=/workspaces -v /var/run/docker.sock:/var/run/docker.sock vsc-volume-bootstrap sleep infinity [2022-12-09T16:58:47.242Z] Stop (514 ms): Run: docker run -d --mount type=volume,src=vsc-remote-containers,dst=/workspaces -v /var/run/docker.sock:/var/run/docker.sock vsc-volume-bootstrap sleep infinity [2022-12-09T16:58:47.244Z] Start: Run in container: /bin/sh [2022-12-09T16:58:47.246Z] Start: Launching Dev Containers helper. [2022-12-09T16:58:47.247Z] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-7951f99283cdb3297c7f31f40db490f393319948.sock) forwarded to local host (/private/tmp/com.apple.launchd.us5RuSyLnx/Listeners). [2022-12-09T16:58:47.248Z] Start: Run: gpgconf --list-dir agent-extra-socket [2022-12-09T16:58:47.255Z] Stop (7 ms): Run: gpgconf --list-dir agent-extra-socket [2022-12-09T16:58:47.255Z] Start: Run in container: /bin/sh [2022-12-09T16:58:47.256Z] Stop (10 ms): Launching Dev Containers helper. [2022-12-09T16:58:47.258Z] Start: Run in container: echo ~ [2022-12-09T16:58:47.259Z] Stop (11 ms): Run: gpgconf --list-dir agent-extra-socket [2022-12-09T16:58:47.483Z] /root [2022-12-09T16:58:47.483Z] [2022-12-09T16:58:47.483Z] Stop (225 ms): Run in container: echo ~ [2022-12-09T16:58:47.483Z] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-7951f99283cdb3297c7f31f40db490f393319948.js' >/tmp/vscode-remote-containers-7951f99283cdb3297c7f31f40db490f393319948.js [2022-12-09T16:58:47.487Z] [2022-12-09T16:58:47.487Z] [2022-12-09T16:58:47.488Z] Stop (5 ms): Run in container: cat <<'EOF-/tmp/vscode-remote-containers-7951f99283cdb3297c7f31f40db490f393319948.js' >/tmp/vscode-remote-containers-7951f99283cdb3297c7f31f40db490f393319948.js [2022-12-09T16:58:47.488Z] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-7951f99283cdb3297c7f31f40db490f393319948.js' >/tmp/vscode-remote-containers-server-7951f99283cdb3297c7f31f40db490f393319948.js_1670605127488 [2022-12-09T16:58:47.516Z] [2022-12-09T16:58:47.516Z] [2022-12-09T16:58:47.516Z] Stop (28 ms): Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-7951f99283cdb3297c7f31f40db490f393319948.js' >/tmp/vscode-remote-containers-server-7951f99283cdb3297c7f31f40db490f393319948.js_1670605127488 [2022-12-09T16:58:47.523Z] Start: Run in container: # Test for /root/.gitconfig and git [2022-12-09T16:58:47.571Z] [2022-12-09T16:58:47.571Z] [2022-12-09T16:58:47.571Z] Stop (48 ms): Run in container: # Test for /root/.gitconfig and git [2022-12-09T16:58:47.571Z] Start: Run in container: # Copy /Users/popticc/.gitconfig to /root/.gitconfig [2022-12-09T16:58:47.577Z] [2022-12-09T16:58:47.577Z] [2022-12-09T16:58:47.577Z] Stop (6 ms): Run in container: # Copy /Users/popticc/.gitconfig to /root/.gitconfig [2022-12-09T16:58:47.577Z] Start: Run in container: command -v git >/dev/null 2>&1 && git config --global --replace-all credential.helper '!f() { node /tmp/vscode-remote-containers-7951f99283cdb3297c7f31f40db490f393319948.js $; }; f' || true [2022-12-09T16:58:47.582Z] [2022-12-09T16:58:47.582Z] [2022-12-09T16:58:47.582Z] Stop (5 ms): Run in container: command -v git >/dev/null 2>&1 && git config --global --replace-all credential.helper '!f() { node /tmp/vscode-remote-containers-7951f99283cdb3297c7f31f40db490f393319948.js $; }; f' || true [2022-12-09T16:58:47.583Z] Start: Run in container: # Test for /root/.ssh/known_hosts and ssh [2022-12-09T16:58:47.590Z] [2022-12-09T16:58:47.590Z] [2022-12-09T16:58:47.590Z] Stop (7 ms): Run in container: # Test for /root/.ssh/known_hosts and ssh [2022-12-09T16:58:47.591Z] Start: Run in container: # Copy /Users/popticc/.ssh/known_hosts to /root/.ssh/known_hosts [2022-12-09T16:58:47.598Z] [2022-12-09T16:58:47.598Z] [2022-12-09T16:58:47.598Z] Stop (7 ms): Run in container: # Copy /Users/popticc/.ssh/known_hosts to /root/.ssh/known_hosts [2022-12-09T16:58:47.667Z] Start: Run in container: cat /workspaces/wallstreetbets-tracker/.devcontainer/devcontainer.json 2>/dev/null [2022-12-09T16:58:47.672Z] Stop (5 ms): Run in container: cat /workspaces/wallstreetbets-tracker/.devcontainer/devcontainer.json 2>/dev/null [2022-12-09T16:58:47.674Z] Start: Run in container: cat /workspaces/wallstreetbets-tracker/.devcontainer/devcontainer.json 2>/dev/null [2022-12-09T16:58:47.680Z] Stop (6 ms): Run in container: cat /workspaces/wallstreetbets-tracker/.devcontainer/devcontainer.json 2>/dev/null [2022-12-09T16:58:47.681Z] The options 'workspaceMount' or 'workspaceFolder' are ignored when cloning a repository into a volume. [2022-12-09T16:58:47.682Z] Start: Run in container: cat <<'EOF-/tmp/devcontainer-40780ff1-5663-442f-aadd-7aa22aabd92f.json' >/tmp/devcontainer-40780ff1-5663-442f-aadd-7aa22aabd92f.json_1670605127682 [2022-12-09T16:58:47.689Z] [2022-12-09T16:58:47.689Z] [2022-12-09T16:58:47.689Z] Stop (7 ms): Run in container: cat <<'EOF-/tmp/devcontainer-40780ff1-5663-442f-aadd-7aa22aabd92f.json' >/tmp/devcontainer-40780ff1-5663-442f-aadd-7aa22aabd92f.json_1670605127682 [2022-12-09T16:58:47.690Z] Start: Run in container: docker volume ls -q [2022-12-09T16:58:47.899Z] Stop (209 ms): Run in container: docker volume ls -q [2022-12-09T16:58:48.209Z] Start: Run in container: docker ps -q -a --filter label=vsch.local.repository=https://github.com/hackingthemarkets/wallstreetbets-tracker.git/tree/main --filter label=vsch.local.repository.volume=vsc-remote-containers --filter label=vsch.local.repository.folder=wallstreetbets-tracker --filter label=vsch.quality=stable [2022-12-09T16:58:48.450Z] Stop (241 ms): Run in container: docker ps -q -a --filter label=vsch.local.repository=https://github.com/hackingthemarkets/wallstreetbets-tracker.git/tree/main --filter label=vsch.local.repository.volume=vsc-remote-containers --filter label=vsch.local.repository.folder=wallstreetbets-tracker --filter label=vsch.quality=stable [2022-12-09T16:58:48.451Z] Start: Run in container: docker ps -q -a --filter label=vsch.local.repository=https://github.com/hackingthemarkets/wallstreetbets-tracker.git/tree/main --filter label=vsch.local.repository.volume=vsc-remote-containers --filter label=vsch.local.repository.folder=wallstreetbets-tracker [2022-12-09T16:58:48.732Z] Stop (281 ms): Run in container: docker ps -q -a --filter label=vsch.local.repository=https://github.com/hackingthemarkets/wallstreetbets-tracker.git/tree/main --filter label=vsch.local.repository.volume=vsc-remote-containers --filter label=vsch.local.repository.folder=wallstreetbets-tracker [2022-12-09T16:58:49.101Z] Start: Run in container: node /root/.vscode-remote-containers/dist/dev-containers-cli-0.266.1/dist/spec-node/devContainersSpecCLI.js up --workspace-folder /workspaces/wallstreetbets-tracker --workspace-mount-consistency cached --id-label vsch.local.repository=https://github.com/hackingthemarkets/wallstreetbets-tracker.git/tree/main --id-label vsch.local.repository.volume=vsc-remote-containers --id-label vsch.local.repository.folder=wallstreetbets-tracker --log-level debug --log-format json --config /workspaces/wallstreetbets-tracker/.devcontainer/devcontainer.json --override-config /tmp/devcontainer-40780ff1-5663-442f-aadd-7aa22aabd92f.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vsc-remote-containers,target=/workspaces,external=true --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default off --mount-workspace-git-root true [2022-12-09T16:58:49.655Z] (node:113) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. [2022-12-09T16:58:49.655Z] (Use
node --trace-deprecation ...
to show where the warning was created) [2022-12-09T16:58:49.663Z] @devcontainers/cli 0.25.2. Node.js v16.17.1. linux 5.15.49-linuxkit x64. [2022-12-09T16:58:49.663Z] Start: Run: docker buildx version [2022-12-09T16:58:49.872Z] Stop (209 ms): Run: docker buildx version [2022-12-09T16:58:49.874Z] github.com/docker/buildx v0.8.2 6224def4dd2c3d347eee19db595348c50d7cb491 [2022-12-09T16:58:49.874Z] [2022-12-09T16:58:49.875Z] Start: Resolving Remote [2022-12-09T16:58:49.886Z] Start: Run: docker-compose version --short [2022-12-09T16:58:49.891Z] Stop (5 ms): Run: docker-compose version --short [2022-12-09T16:58:49.891Z] Start: Run: docker compose version --short [2022-12-09T16:58:49.895Z] Stop (9 ms): Run: docker-compose version --short [2022-12-09T16:58:50.009Z] Stop (118 ms): Run: docker compose version --short [2022-12-09T16:58:50.009Z] Docker Compose version: 2.12.2 [2022-12-09T16:58:50.011Z] Start: Run: docker ps -q -a --filter label=com.docker.compose.project=wallstreetbets-tracker_devcontainer --filter label=com.docker.compose.service=app [2022-12-09T16:58:50.060Z] Stop (49 ms): Run: docker ps -q -a --filter label=com.docker.compose.project=wallstreetbets-tracker_devcontainer --filter label=com.docker.compose.service=app [2022-12-09T16:58:50.061Z] Start: Run: docker inspect --type container 6887ee78f77b [2022-12-09T16:58:50.103Z] Stop (42 ms): Run: docker inspect --type container 6887ee78f77b [2022-12-09T16:58:50.106Z] Start: Run: docker compose -f /workspaces/wallstreetbets-tracker/.devcontainer/docker-compose.yml --profile config [2022-12-09T16:58:50.237Z] Stop (131 ms): Run: docker compose -f /workspaces/wallstreetbets-tracker/.devcontainer/docker-compose.yml --profile config [2022-12-09T16:58:50.238Z] name: devcontainer services: app: build: context: /workspaces/wallstreetbets-tracker dockerfile: .devcontainer/Dockerfile command:[2022-12-09T16:58:54.503Z] [+] Building 0.1s (2/4)
=> [internal] load build definition from Dockerfile.buildContent 0.0s => => transferring dockerfile: 95B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s [2022-12-09T16:58:54.552Z] [+] Building 0.2s (5/5) FINISHED
=> [internal] load build definition from Dockerfile.buildContent 0.0s => => transferring dockerfile: 95B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build context 0.0s => => transferring context: 288.47kB 0.0s => CACHED [1/1] COPY . /tmp/build-features/ 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:1ab5a8f34b9172081c7e31fd6f92a76edb555fe784229 0.0s => => naming to docker.io/library/dev_container_feature_content_temp 0.0s [2022-12-09T16:58:54.557Z] Stop (440 ms): Run: docker build -t dev_container_feature_content_temp -f /tmp/devcontainercli-root/container-features/0.25.2-1670605131588/Dockerfile.buildContent /tmp/devcontainercli-root/container-features/0.25.2-1670605131588 [2022-12-09T16:58:54.559Z] Docker Compose override file for building image: version: '3.8'
services: app: build: dockerfile: /tmp/devcontainercli-root/container-features/0.25.2-1670605131588/Dockerfile-with-features args:
[2022-12-09T16:58:54.564Z] Start: Run: docker inspect --type image wallstreetbets-tracker_devcontainer-app [2022-12-09T16:58:54.669Z] Stop (105 ms): Run: docker inspect --type image wallstreetbets-tracker_devcontainer-app [2022-12-09T16:58:54.670Z] Docker Compose override file for creating container: version: '3.8'
services: 'app': entrypoint: ["/bin/sh", "-c", "echo Container started\n trap \"exit 0\" 15\n \n exec \"$$@\"\n while sleep 1 & wait $$!; do :; done", "-"] labels: