You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of Podman 4.9 we support the Heredoc format for containerfiles, so maybe it's worth moving to that. This means that the containerfile just has one RUN directive and therefore I believe it would reduce the number of layers, reducing the size of the container and the time it takes to build and transport.
Existing Containerfile
FROM registry.redhat.io/rhel9/rhel-bootc
ADD etc /etc
RUN dnf install -y httpd
RUN systemctl enable httpd
Proposed new Containerfile
FROM registry.redhat.io/rhel9/rhel-bootc
ADD etc /etc
RUN <<EOF
dnf install -y httpd
systemctl enable httpd
EOF
The text was updated successfully, but these errors were encountered:
Note: Later when I added vim to the Containerfile the podman build command seemed not to pick it up. Will investigate further to see if it is a product issue.
Generally I'm on board with this, very happy to see the support land. I did some local testing yesterday on this, it seems to have a few quirks I haven't worked out consistently. I'm going to keep testing and see if I can get consistent successes with a heredoc that works. Until then, I'll watch this.
As of Podman 4.9 we support the Heredoc format for containerfiles, so maybe it's worth moving to that. This means that the containerfile just has one
RUN
directive and therefore I believe it would reduce the number of layers, reducing the size of the container and the time it takes to build and transport.Existing Containerfile
Proposed new Containerfile
The text was updated successfully, but these errors were encountered: