devcontainers / spec

Development Containers: Use a container as a full-featured development environment.
https://containers.dev
Creative Commons Attribution 4.0 International
3.35k stars 205 forks source link

Evergreen containers #99

Open sliekens opened 1 year ago

sliekens commented 1 year ago

Hi,

When using build.dockerfile to create a development container and the Dockerfile is changed, a new container is built the next time it is opened. This makes sense to me.

When using image (or an equivalent dockerComposeFile) with a stable tag such as latest to create a development container, the image is not updated unless I do a docker pull or docker-compose pull. This surprises me.

Wouldn't it make sense to align these two so that you are always using a container based on the latest available image?

image

bamurtaugh commented 1 year ago

Thanks for opening this @sliekens, and I definitely understand what you mention.

In general, the Dev Containers extension and Codespaces has preferred to use cached content to aid in build performance. But cache management is ultimately left to the user or implementor of the spec, so I think you could certainly choose to always grab the latest image.