Skip to content

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

@PaulHiemstra

Description

@PaulHiemstra

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

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugcontainersIssue in vscode-remote containers

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions