Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

when using dockerComposeFile prebuilds are ignored

Aperta
#867 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@chrmarti ci sta già lavorando.

Dal 3/9/2024.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

We have the following devcontainers.json file at .devcontainers/flask/devcontainers.json:

{
	"name": "flask",
	"dockerComposeFile": [
		"../../docker-compose.app.yaml",
		"../docker-compose.app.dev.yaml"
	],
	"service": "flask",
	"workspaceFolder": "/home/jan",
	"features": {},
	"customizations": {
		"vscode": {
			"settings": {
				...
			},
			"extensions": [
				...
			]
		}
	}
}

Running devcontainer up --workspace-folder . --config .devcontainer/flask/devcontainer.json works fine, it builds the image and stands up the docker compose service.

I want to utilize prebuilding with our docker compose stack so I take the resulting built images and push them to our repository. If anyone pulls those images and runs devcontainer up --workspace-folder . --config .devcontainer/flask/devcontainer.json it rebuilds the entire image from scratch

If in the devcontainers.json I use the image field then it doesn't rebuild but there's no good way to use something like VS Code's > Reopen in Container since it doesn't know it part of the docker compose stack.

Does devcontainers support using prebuilt images with docker compose files? Is there somethings special I need to do to get it to recognize the image is fully built or to point directly at the cache?

To me it seems like it seems to be running docker compose build instead of docker compose up when running devcontainers up. If I run docker compose up myself and then attach VS Code it seems to work as intended.

Lingua principale
TypeScript
Stelle
3k
Fork
461
Merge medio
18m
PR unite (30g)
5

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di devcontainers/cli

Tutte le issue di devcontainers/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.