microsoft / microsoft/vscode-remote-release
Dev Container Docker build failes if "from" keyword is used in a string in Dockerfile
Open
@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
- Create files
devcontainer.json
{
"dockerFile": "Dockerfile"
}
Dockerfile
FROM ubuntu:22.04
RUN echo ' Greetings \
from Simon' >> ~/test.txt
- Reopen in container
- Error:
Error response from daemon: No such image: simon:latest
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.