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

Podman/Buildah: Add uCPP package via new build-arg #36

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions buildah/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ label "io.containers.capabilities"="CHOWN,DAC_OVERRIDE,FOWNER,FSETID,KILL,NET_BI
RUN echo -e "\n\n# Added during image build" >> /etc/dnf/dnf.conf && \
echo -e "minrate=100\ntimeout=60\n" >> /etc/dnf/dnf.conf

ARG INSTALL_RPMS="buildah fuse-overlayfs ucpp"

# Don't include container-selinux and remove
# directories used by dnf that are just taking
# up space.
Expand All @@ -42,16 +44,16 @@ RUN dnf -y makecache && \
rpm --setcaps shadow-utils 2>/dev/null && \
case "${FLAVOR}" in \
stable) \
dnf -y install buildah fuse-overlayfs cpp --exclude container-selinux \
dnf -y install $INSTALL_RPMS --exclude container-selinux \
;; \
testing) \
dnf -y install --enablerepo=updates-testing buildah fuse-overlayfs cpp \
--exclude container-selinux \
dnf -y install $INSTALL_RPMS --exclude container-selinux \
--enablerepo=updates-testing \
;; \
upstream) \
dnf -y install 'dnf-command(copr)' --enablerepo=updates-testing && \
dnf -y copr enable rhcontainerbot/podman-next && \
dnf -y install buildah fuse-overlayfs \
dnf -y install $INSTALL_RPMS \
--exclude container-selinux \
--enablerepo=updates-testing \
;; \
Expand All @@ -60,6 +62,7 @@ RUN dnf -y makecache && \
exit 1 \
;; \
esac && \
ln -s /usr/bin/ucpp /usr/local/bin/cpp && \
dnf -y clean all && \
rm -rf /var/cache /var/log/dnf* /var/log/yum.*

Expand Down
15 changes: 9 additions & 6 deletions podman/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ ARG FLAVOR=stable
RUN echo -e "\n\n# Added during image build" >> /etc/dnf/dnf.conf && \
echo -e "minrate=100\ntimeout=60\n" >> /etc/dnf/dnf.conf

ARG INSTALL_RPMS="podman fuse-overlayfs openssh-clients ucpp"

# Don't include container-selinux and remove
# directories used by dnf that are just taking
# up space.
Expand All @@ -39,16 +41,16 @@ RUN dnf -y makecache && \
rpm --setcaps shadow-utils 2>/dev/null && \
case "${FLAVOR}" in \
stable) \
dnf -y install podman fuse-overlayfs openssh-clients --exclude container-selinux \
dnf -y install $INSTALL_RPMS --exclude container-selinux \
;; \
testing) \
dnf -y install podman fuse-overlayfs openssh-clients --exclude container-selinux \
dnf -y install $INSTALL_RPMS --exclude container-selinux \
--enablerepo updates-testing \
;; \
upstream) \
dnf -y install 'dnf-command(copr)' --enablerepo=updates-testing && \
dnf -y copr enable rhcontainerbot/podman-next && \
dnf -y install podman fuse-overlayfs openssh-clients \
dnf -y install $INSTALL_RPMS \
--exclude container-selinux \
--enablerepo=updates-testing \
;; \
Expand All @@ -57,12 +59,13 @@ RUN dnf -y makecache && \
exit 1 \
;; \
esac && \
ln -s /usr/bin/ucpp /usr/local/bin/cpp && \
dnf clean all && \
rm -rf /var/cache /var/log/dnf* /var/log/yum.*

RUN useradd podman; \
echo -e "podman:1:999\npodman:1001:64535" > /etc/subuid; \
echo -e "podman:1:999\npodman:1001:64535" > /etc/subgid;
RUN useradd podman && \
echo -e "podman:1:999\npodman:1001:64535" > /etc/subuid && \
echo -e "podman:1:999\npodman:1001:64535" > /etc/subgid

ADD /containers.conf /etc/containers/containers.conf
ADD /podman-containers.conf /home/podman/.config/containers/containers.conf
Expand Down