microsoft / microsoft/vscode-remote-release

Upgrade to 0.266.1 spawns dev_containers_target_stage which does not exist

Open
#7,702 3 comments 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Dec 14, 2022.

bug containers
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

The latest version of Dev Containers does not let me build a container from an external Dockerfile. This issue can be fixed be going to an older version of the Dev Containers extension. From my investigation, I have noticed that the docker build command is failing as it is setting the --target to dev_containers_target_stage. In my Dockerfile this target is named as 'dev'. The failing command is also spawning a build arg of _DEV_CONTAINERS_BASE_IMAGE=dev which also does not exist in my Dockerfile.

Before this I was using remote-container extension v0.251.0 where everything worked fine. Not sure if this is a bug, or some major changes have been made to how Dev Containers now run on a newer version.

  • VSCode Version: 1.73.1
  • Local OS Version: Windows_NT x64 10.0.19044
  • Remote OS Version: Red Hat Enterprise Linux Server release 7.9 (Maipo)
  • Remote Extension/Connection Type: SSH into Linux and then run Dev Containers
  • Logs: Logs.txt

Steps to Reproduce:

  1. Set "build" "target" to "dev" in the devcontainer.json
  2. Create a multi-stage Dockerfile with a stage called "dev" (this is what we want to invoke for the Remote Container)

Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.