microsoft / microsoft/vscode-remote-release

Dev Container Docker build failes if "from" keyword is used in a string in Dockerfile

Open
#9,491 0 comments 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Dec 12, 2024.

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

Description

  • VSCode Version: 1.86.0
  • Local OS Version: Ubuntu 22.04.3 LTS
  • Remote OS Version: Ubuntu 22.04
  • Remote Extension/Connection Type: Containers
  • Remote Development Extension version: v.0.25.0

The "From" keyword is interpreted as a docker command if it is the first element in a new line even though it is part of a string.
The following example demonstrates the issue.

Minimal Example to reproduce the issue
  1. Create files
    devcontainer.json
{    
    "dockerFile": "Dockerfile"
}

Dockerfile

FROM ubuntu:22.04

RUN echo ' Greetings \ 
from Simon' >> ~/test.txt
  1. Reopen in container
  2. Error:
 Error response from daemon: No such image: simon:latest

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.