Closed loynoir closed 1 year ago
Thanks for reporting! This looks like a duplicate of https://github.com/microsoft/vscode-dev-containers/issues/1567 / https://github.com/microsoft/vscode-remote-release/issues/7047
Which version of Remote - Containers are you using? It should be fixed in the latest versions: https://github.com/microsoft/vscode-remote-release/issues/7047#issuecomment-1212197426.
Just as an additional point, since google searching led me here.
If you:
Dev Containers: Add Dev Container Configuration Files...
From 'docker-compose.yml'
Select a service
you select a service from your docker-compose.yml
file that has a profiles
entry likeversion: "3"
services:
myservice:
profiles:
- development
build:
context: "."
Then when you call Dev Containers: Reopen in Container
, you'll hit an error like:
[2022-12-09T13:04:06.542Z] Start: Run: docker inspect --type image my-project-myservice
[2022-12-09T13:04:06.561Z] Stop (19 ms): Run: docker inspect --type image myproject-myservice
[2022-12-09T13:04:07.487Z] Error fetching image details: No manifest found for docker.io/library/myproject-myservice.
[2022-12-09T13:04:07.487Z] Start: Run: docker pull myproject-myservice
[2022-12-09T13:04:07.615Z] Using default tag: latest
[2022-12-09T13:04:09.459Z] Error response from daemon: pull access denied for myproject-myservice, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
[2022-12-09T13:04:09.461Z] Stop (1974 ms): Run: docker pull myproject-myservice
[2022-12-09T13:04:09.461Z] []
[2022-12-09T13:04:09.461Z] Error: No such image: myproject-myservice
[2022-12-09T13:04:09.463Z] Error: Command failed: docker inspect --type image myproject-myservice
This is caused by the profiles
clause in the yaml. VS.Code selected a service that docker-compose will not try to build unless --profile <profile name>
is added as an option to docker-compose
, like:
docker-compose --profile developmet build -f docker-compose.yml ...
But dev-containters doesn't pass that option, despite allowing you to select a service that can only be built or brought up by specifying a profile.
There is an issue requesting profile support for docker-compose
at microsoft/vscode-remote-release#5795
Steps to Reproduce:
vscode > devcontainer add config > show all > from compose
Expected
Actual