microsoft / microsoft/vscode-remote-release
[Dev Containers] Incompatibility with Podman .in files
@chrmarti is already working on this.
Since May 8, 2026.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
- VSCode Version: 1.118.1
- Local OS Version: Fedora 44 Workstation
- Remote OS Version: Fedora 44 Server
- Remote Extension/Connection Type: Dev Containers/WSL/Remote - Tunnels/VS Code Server
podman build will apply the C preprocessor first if you give your Dockerfile a .in extension: https://docs.podman.io/en/latest/markdown/podman-build.1.html#description. This is incredibly useful if you want to have a base image for all your devcontainers with some common tools installed, and then layer on language-specific things. For example:
tools.Dockerfile:
FROM docker.io/debian:latest
RUN apt-get update && apt-get install -y vim
cpp.Dockerfile.in:
#include "tools.Dockerfile"
RUN apt-get install -y clang
rust.Dockerfile.in:
#include "tools.Dockerfile"
RUN apt-get install -y rust-all
This basically allows you to avoid having to build the base image by hand, which is not trivial since you have to manually pass in all the same flags to the builder as devcontainers-cli.
However, this currently does not work with the VS Code Dev Containers extension for a couple of reasons. From the logs:
[2026-05-07T16:04:30.959Z] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=/home/rdong/projects/cpp_project --filter label=devcontainer.config_file=/home/rdong/projects/cpp_project/.devcontainer/devcontainer.json
[2026-05-07T16:04:31.014Z] Stop (55 ms): Run: podman ps -q -a --filter label=devcontainer.local_folder=/home/rdong/projects/cpp_project --filter label=devcontainer.config_file=/home/rdong/projects/cpp_project/.devcontainer/devcontainer.json
[2026-05-07T16:04:31.043Z] Error: Error parsing Dockerfile: Dockerfile contains no FROM instructions
[2026-05-07T16:04:31.043Z] at vQ (/home/rdong/.vscode-remote-containers/dist/dev-containers-cli-0.460.0/dist/spec-node/devContainersSpecCLI.js:393:12987)
[2026-05-07T16:04:31.043Z] at xV (/home/rdong/.vscode-remote-containers/dist/dev-containers-cli-0.460.0/dist/spec-node/devContainersSpecCLI.js:467:2349)
[2026-05-07T16:04:31.043Z] at async Rp (/home/rdong/.vscode-remote-containers/dist/dev-containers-cli-0.460.0/dist/spec-node/devContainersSpecCLI.js:467:1910)
[2026-05-07T16:04:31.043Z] at async cG (/home/rdong/.vscode-remote-containers/dist/dev-containers-cli-0.460.0/dist/spec-node/devContainersSpecCLI.js:467:608)
[2026-05-07T16:04:31.043Z] at async A9 (/home/rdong/.vscode-remote-containers/dist/dev-containers-cli-0.460.0/dist/spec-node/devContainersSpecCLI.js:485:4649)
[2026-05-07T16:04:31.043Z] at async kI (/home/rdong/.vscode-remote-containers/dist/dev-containers-cli-0.460.0/dist/spec-node/devContainersSpecCLI.js:485:5768)
[2026-05-07T16:04:31.043Z] at async vZ (/home/rdong/.vscode-remote-containers/dist/dev-containers-cli-0.460.0/dist/spec-node/devContainersSpecCLI.js:666:205)
[2026-05-07T16:04:31.043Z] at async GZ (/home/rdong/.vscode-remote-containers/dist/dev-containers-cli-0.460.0/dist/spec-node/devContainersSpecCLI.js:665:15080)
[2026-05-07T16:04:31.043Z] at async /home/rdong/.vscode-remote-containers/dist/dev-containers-cli-0.460.0/dist/spec-node/devContainersSpecCLI.js:485:1917
It's trying to run some kind of checks against the raw cpp.Dockerfile.in file before it has gone through the C preprocessor, and thus is interpreting the #include as a comment. So it sees a Dockerfile without a FROM instruction. As far as I know there's no way to actually force Podman to emit the preprocessed file, so either VS Code or devcontainers-cli needs to actually run cpp -E cpp.Dockerfile.in manually and save the output to obtain the actual Dockerfile, and then proceed with the next steps.
Even if you try to work around this by moving the FROM instruction from the base image to the consumer image as below, it still will not work.
tools.Dockerfile:
RUN apt-get update && apt-get install -y vim
cpp.Dockerfile.in:
FROM docker.io/debian:latest
#include "tools.Dockerfile"
RUN apt-get install -y clang
This gets past the previous issue but runs into another. The actual build instruction that gets run is this:
[2026-05-08T05:27:18.506Z] Stop (915 ms): Run: podman buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-rdong/container-features/0.86.1-1778218037589/Dockerfile-with-features -t vsc-cpp_project-1a917c6c7f2b3d2b5bde19199f130d1c7d9f5a68898e8780fcb310393af681df --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /home/rdong/projects/cpp_project/.devcontainer/Containerfiles
where /tmp/devcontainercli-rdong/container-features/0.86.1-1778218037589/Dockerfile-with-features is this:
ARG _DEV_CONTAINERS_BASE_IMAGE=placeholder
FROM docker.io/debian:latest AS dev_container_auto_added_stage_label
#include "tools.Dockerfile"
RUN apt-get install -y clang
FROM $_DEV_CONTAINERS_BASE_IMAGE AS dev_containers_target_stage
LABEL devcontainer.metadata="[
...omitted...
]"
Again, the C preprocessor still has not been run on this file yet. Furthermore, the filename Dockerfile-with-features does not end in .in, so Podman now won't run the CPP on it either when it tries to build this image. So tools.Dockerfile never gets included and you end up missing the first RUN instruction.
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.