Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest images when using docker-compose in devcontainer #8094

Open
adamlewisgucci opened this issue Feb 23, 2023 · 5 comments
Open

Use latest images when using docker-compose in devcontainer #8094

adamlewisgucci opened this issue Feb 23, 2023 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers

Comments

@adamlewisgucci
Copy link

Related to: #3128, when using docker-compose files to Rebuild and Reopen/Rebuild without Cache and Reopen, vscode does not download the latest image versions.

It can currently be worked around via initializeCommand as suggested in the other issue, but this gets quite verbose when using multiple compose files & makes for a maintenance pain, as I need to maintain the list of files in two places

  • VSCode Version: 1.75.1
  • Local OS Version: Windows 10
  • Remote OS Version: Docker for windows
  • Remote Extension/Connection Type: Docker
@github-actions github-actions bot added the containers Issue in vscode-remote containers label Feb 23, 2023
@chrmarti
Copy link
Contributor

chrmarti commented Mar 8, 2023

We only add --pull when we don't need a temporary image to include container features. This is to fix devcontainers/cli#60. When Docker Compose adds support for build contexts we can use that and remove this workaround.

@chrmarti chrmarti self-assigned this Mar 8, 2023
@chrmarti chrmarti added the bug Issue identified by VS Code Team member as probable bug label Mar 8, 2023
@chrmarti
Copy link
Contributor

chrmarti commented Mar 8, 2023

Related: #7305 (comment)

@DavidS-ovm
Copy link

@chrmarti is there a way to bake features into an image so I can move the requested features from my devcontainer.json into a separate build process? We're deploying dev versions of our services as part of the docker-compose and not getting automatic updates on rebuild is painful enough that I would consider such a workaround.

@chrmarti
Copy link
Contributor

You can use the Dev Containers CLI to do that and there is a GitHub action to simplify integration into CI.

@chrmarti
Copy link
Contributor

You would add a second devcontainer.json that does not use Docker Compose, but only adds features and optionally uses a Dockerfile. You can then use the CLI or GitHub action to build an image from that second devcontainer.json which you the push to a container registry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers
Projects
None yet
Development

No branches or pull requests

3 participants