microsoft / microsoft/vscode-remote-release

Latest version of Remote Containers causes an error when building my devcontainer

Open
#7,319 17 comments 4 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Oct 10, 2022.

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

Description

The latest version of remote containers no longer allows me to build a container that is externally defined in a dockerfile. The issue is fixed by going back to the previous version of the plugin.

  • VSCode Version:1.72.0
  • Local OS Version: Windows 11 21H2
  • Remote OS Version: Ubuntu 20.04 (WSL2)
  • Remote Extension/Connection Type: Container running in Docker desktop
  • Logs: error.log

Steps to Reproduce:

  1. Create new directory and drop the .devcontainer.json file in the root
{
  "name": "Tensorflow with Jupyter (GPU enabled)",
  "build": { "dockerfile": "docker/Dockerfile" },
  "forwardPorts": [8888],
  "postStartCommand": "nohup bash -c 'jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token=jupdevtoken &'",
  "runArgs": [
    "--gpus",
    "all"
  ],
  "extensions": [
    "ms-python.python",
    "ms-python.vscode-pylance",
    "ms-toolsai.jupyter"
  ]
}
  1. Create a docker subdirectory, drop Dockerfile in that subdir
FROM tensorflow/tensorflow:latest-gpu-jupyter

RUN pip install pandas\
    sklearn\
    seaborn\
  1. Start VS Code and restart the directory in the container
  2. The following error occurs when building the container (full log in error.log
    error: failed to solve: rpc error: code = Unknown desc = failed to solve with fr
    ontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code    
    = Unknown desc = target stage dev_containers_target_stage could not be found

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

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.