I can't get a compose file to run through devcontainers even though it runs fine from command line. The culprit seems to be a corrupted 'Features Compose Override File' generation that I don't even know how to clear.
At one point my compose.yaml file had the following environment variable set:
This works in the repro example below and has worked for me in the past with docker compose running from CLI. However, it complained while I was migrating to use compose + devcontainers. From the logs below, it seems like the dictionary was getting converted to a list, and the colon in the value field doesn't play nice:
[2024-09-24T19:43:41.967Z] Writing docker-compose.devcontainer.containerFeatures-1727207021967-6e5554e4-df63-43ad-ab82-77c2b36e0506.yml to /home/achille/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose
[2024-09-24T19:43:41.967Z] Start: Run: docker compose --project-name dev-docker -f /home/achille/gmr/dev-docker/compose.yaml -f /home/achille/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.containerFeatures-1727207021967-6e5554e4-df63-43ad-ab82-77c2b36e0506.yml up -d
[2024-09-24T19:43:42.015Z] WARN[0000] The "message" variable is not set. Defaulting to a blank string.
[2024-09-24T19:43:42.015Z] services.customer.environment.[6]: unexpected type map[string]interface {}
The first thing I did was to remove the offending ROSCONSOLE_FORMAT variable from my compose.yaml file. However, Rebuild and reopen in container will still yield the same error. I've tried reopening the window to no avail.
When I copy the command being run docker compose --project-name dev-docker -f /home/achille/gmr/dev-docker/compose.yaml -f /home/achille/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.containerFeatures-1727207021967-6e5554e4-df63-43ad-ab82-77c2b36e0506.yml up -d and modify the containerFeatures compose file and remove the offending line manually and then run this command from the terminal, it works fine. But this file gets regenerated every time I run 'reopen in container'.
I've tried:
clearing the user data folder rm -rf /home/achille/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data
clearing all files in ~/.config/Code dir that had a reference to ROSCONSOLE_FORMAT, including
EDIT: I've found that the issue stems from the devcontainer.metadata that's attached to the image being used. That image was created using devcontainers and has the ROSCONSOLE_FORMAT baked into it, which this compose override file generation seems to be using. Removing the environment variable from the original image solved the issue. I will update the repro repository accordingly.
dev containers version:
v0.387.0
OS: Ubuntu 24.04Description
I can't get a compose file to run through devcontainers even though it runs fine from command line. The culprit seems to be a corrupted 'Features Compose Override File' generation that I don't even know how to clear.
At one point my compose.yaml file had the following environment variable set:
This works in the repro example below and has worked for me in the past with docker compose running from CLI. However, it complained while I was migrating to use compose + devcontainers. From the logs below, it seems like the dictionary was getting converted to a list, and the colon in the value field doesn't play nice:
This failed with the following error:
The first thing I did was to remove the offending
ROSCONSOLE_FORMAT
variable from mycompose.yaml
file. However,Rebuild and reopen in container
will still yield the same error. I've tried reopening the window to no avail.When I copy the command being run
docker compose --project-name dev-docker -f /home/achille/gmr/dev-docker/compose.yaml -f /home/achille/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.containerFeatures-1727207021967-6e5554e4-df63-43ad-ab82-77c2b36e0506.yml up -d
and modify thecontainerFeatures
compose file and remove the offending line manually and then run this command from the terminal, it works fine. But this file gets regenerated every time I run 'reopen in container'.I've tried:
rm -rf /home/achille/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data
~/.config/Code
dir that had a reference toROSCONSOLE_FORMAT
, including~/.config/Code/User/globalStorage/state.vscdb
~/.config/Code/User/workspaceStorage/594f8f796eef47d970635b16d002a443/state.vscdb
rm /tmp/devcontainercli-achille/container-features/0.71.0-1727210272333/Dockerfile-with-features
rm /var/lib/containerd/io.containerd.metadata.v1.bolt/meta.db
EDIT: I've found that the issue stems from the devcontainer.metadata that's attached to the image being used. That image was created using devcontainers and has the
ROSCONSOLE_FORMAT
baked into it, which this compose override file generation seems to be using. Removing the environment variable from the original image solved the issue. I will update the repro repository accordingly.Repro
EDIT: repro here