Skip to content

Commit

Permalink
Merge pull request #36 from cevich/add_ucpp
Browse files Browse the repository at this point in the history
Podman/Buildah: Add uCPP package via new build-arg
  • Loading branch information
cevich authored Jun 20, 2024
2 parents a169fed + 93c5c10 commit 147ee0b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
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

0 comments on commit 147ee0b

Please sign in to comment.