If /tmp/devcontainercli-$USER does not exist, devcontainer fails to start
We have a new issue where one of our devcontainers do not start the first time after reboot. It must be rebuilt before it works.
This devcontainer uses docker-compose and building from the compose-file.
I can reproduce it 100% of the time with this devcontainer but not with our other devcontainers.
I have created a repo which reproduces this issue: https://github.com/staffanf/vscode-remote-release-issue-9138
-
VSCode Version: 1.83.1
-
Local OS Version: Ubuntu 22.04.3 LTS
-
Remote OS Version: Ubuntu 22.04.3 LTS docker container
-
Remote Extension/Connection Type: Containers
-
Logs:
remoteContainers-2023-10-26T11-54-28.837Z.log
Steps to Reproduce:
- Reboot machine or manually remove /tmp/devcontainercli-$USER/
- Open a devcontainer using docker-compose
- ERROR: Starting devcontainer crashes with error since it's missing this tmp file
- Reopen locally
- Rebuild and reopen container
- Container starts normally
Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No
We moved the docker-compose.yml overlay to the user data dir to avoid this. It appears that there is some other file (or folder) referenced by the existing Docker Compose container too.
@chrmarti FYI. I just tested this and the bug still exists in the latest versions of vscode and docker-ce.
This issue still persists in the latest vscode (1.97.2) and docker-ce. In my case I found a reference to /tmp/ directory in the file /home/name/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1727231618263.yml. The entire contents of the file is
version: "3.8"
services:
devcontainer:
build:
dockerfile: /tmp/devcontainercli-name/container-features/0.69.0-1727231611174/Dockerfile-with-features
args:
- BUILDKIT_INLINE_CACHE=1
- _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label
- _DEV_CONTAINERS_IMAGE_USER=updater
- _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp
additional_contexts:
- dev_containers_feature_content_source=/tmp/devcontainercli-name/container-features/0.69.0-1727231611174
Note that this devcontainer was created recently, so the bug is not a holdover from an older version. I don't know the exact version of vscode this devcontainer was created on but it was done on whatever version was latest during the first week of January.