Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heredoc notation support for Containerfile #19578

Closed
GrabbenD opened this issue Aug 10, 2023 · 1 comment
Closed

Heredoc notation support for Containerfile #19578

GrabbenD opened this issue Aug 10, 2023 · 1 comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@GrabbenD
Copy link

GrabbenD commented Aug 10, 2023

Feature request description

Docker recently introduced Heredoc notation for Dockerfile:
https://www.docker.com/blog/introduction-to-heredocs-in-dockerfiles/

Since dockerfile:1.4 it's possible to use this syntax:

# syntax=docker/dockerfile:1
COPY <<EOF /etc/yum.repos.d/Repo.repoxyz
[repo]
name            = YUM Repository
baseurl         = https://example.com/packages/
enabled         = 1
gpgcheck        = 0
EOF

Meanwhile Podman doesn't seem to understand Heredoc notation in Containerfile:

STEP 38/45: COPY <<EOF /etc/yum.repos.d/Repo.repoxyz
Error: building at STEP "COPY <<EOF /etc/yum.repos.d/Repo.repoxyz": checking on sources under "/home": copier: stat: "/<<EOF": no such file or directory

Have you considered any alternatives?

Buildah is still working on this:
containers/buildah#3474

However, technically it should be possible to use this in Podman by using BuildKit for now as outlined here:
https://pythonspeed.com/articles/podman-buildkit/

@GrabbenD GrabbenD added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 10, 2023
@flouthoc
Copy link
Collaborator

This is duplicate of containers/buildah#3474, please follow issue containers/buildah#3474 for tracking updates on heredoc feature.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Nov 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

2 participants