Skip to content

Support .in Dockerfiles via cpp when available#1230

Draft
Mathiyarasy wants to merge 4 commits into
devcontainers:mainfrom
Mathiyarasy:dev/Mathi/cliPodman
Draft

Support .in Dockerfiles via cpp when available#1230
Mathiyarasy wants to merge 4 commits into
devcontainers:mainfrom
Mathiyarasy:dev/Mathi/cliPodman

Conversation

@Mathiyarasy
Copy link
Copy Markdown
Contributor

@Mathiyarasy Mathiyarasy commented May 18, 2026

Support .in Dockerfiles in Dev Containers

Issue Description:
Podman supports building from Dockerfile.in files by using the system cpp preprocessor to generate a valid Dockerfile before the build runs.
Dev Containers do not currently support this workflow. The existing CLI reads the Dockerfile directly, identifies the final FROM stage, and then extends it with features.
When the input is a Dockerfile.in that is not preprocessed, the CLI did not see a resolved FROM instruction, and the build fails with error
Error parsing Dockerfile: Dockerfile contains no FROM instructions

Solution:
If cpp is available in the execution environment, the CLI uses it to generate a resolved Dockerfile, allowing Dev Containers to support .in files for both Docker and Podman. If cpp is unavailable, the CLI should fail with a clear error message

@Mathiyarasy Mathiyarasy changed the title If cpp is available support .in Dockerfiles when using Devcontainers If cpp is available support Dockerfiles.in when using Devcontainers May 18, 2026
@Mathiyarasy Mathiyarasy changed the title If cpp is available support Dockerfiles.in when using Devcontainers Support .in Dockerfiles via cpp when available May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant