diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/dependencies.txt | 34 | ||||
-rw-r--r-- | contrib/gate/Dockerfile | 39 | ||||
-rw-r--r-- | contrib/podmanimage/stable/Dockerfile | 10 | ||||
-rw-r--r-- | contrib/podmanimage/stable/containers.conf | 11 | ||||
-rw-r--r-- | contrib/podmanimage/stable/manual/Containerfile | 8 | ||||
-rw-r--r-- | contrib/podmanimage/testing/Dockerfile | 10 | ||||
-rw-r--r-- | contrib/podmanimage/upstream/Dockerfile | 14 |
7 files changed, 63 insertions, 63 deletions
diff --git a/contrib/dependencies.txt b/contrib/dependencies.txt new file mode 100644 index 000000000..5a6fa9834 --- /dev/null +++ b/contrib/dependencies.txt @@ -0,0 +1,34 @@ +# Fedora dependencies for building podman + +btrfs-progs-devel +bzip2 +container-selinux +containernetworking-cni +device-mapper-devel +findutils +git +glib2-devel +glibc-static +golang +gpgme-devel +iptables +libassuan-devel +libseccomp-devel +libselinux-devel +lsof +make +nmap-ncat +procps-ng +python +python3-dateutil +python3-pip +python3-psutil +python3-pytoml +python3-pyyaml +python3-varlink +rsync +slirp4netns +unzip +which +xz +zip diff --git a/contrib/gate/Dockerfile b/contrib/gate/Dockerfile index 4fddae557..f7cd8f2b3 100644 --- a/contrib/gate/Dockerfile +++ b/contrib/gate/Dockerfile @@ -1,38 +1,4 @@ FROM fedora:31 -RUN dnf -y install \ - btrfs-progs-devel \ - bzip2 \ - container-selinux \ - containernetworking-cni \ - device-mapper-devel \ - findutils \ - git \ - glib2-devel \ - glibc-static \ - golang \ - gpgme-devel \ - iptables \ - libassuan-devel \ - libseccomp-devel \ - libselinux-devel \ - lsof \ - make \ - nmap-ncat \ - procps-ng \ - python \ - python3-dateutil \ - python3-pip \ - python3-psutil \ - python3-pytoml \ - python3-pyyaml \ - python3-varlink \ - rsync \ - slirp4netns \ - unzip \ - which \ - xz \ - zip \ - && dnf clean all ENV GOPATH="/var/tmp/go" \ GOBIN="/var/tmp/go/bin" \ @@ -43,6 +9,11 @@ ENV GOPATH="/var/tmp/go" \ # Only needed for installing build-time dependencies, then will be removed COPY / $GOSRC +# Install packages from dependencies.txt, ignoring commented lines +RUN dnf -y install \ + $(grep "^[^#]" $GOSRC/contrib/dependencies.txt) \ + && dnf clean all + # Install dependencies RUN set -x && \ mkdir -p "$GOBIN" && \ diff --git a/contrib/podmanimage/stable/Dockerfile b/contrib/podmanimage/stable/Dockerfile index c0c07d9d2..7aeb5bbdc 100644 --- a/contrib/podmanimage/stable/Dockerfile +++ b/contrib/podmanimage/stable/Dockerfile @@ -11,16 +11,12 @@ FROM fedora:latest # Don't include container-selinux and remove # directories used by yum that are just taking # up space. -RUN useradd build; yum -y update; yum -y reinstall shadow-utils; yum -y install podman fuse-overlayfs --exclude container-selinux; rm -rf /var/cache /var/log/dnf* /var/log/yum.* +RUN useradd podman; yum -y update; yum -y reinstall shadow-utils; yum -y install podman fuse-overlayfs --exclude container-selinux; rm -rf /var/cache /var/log/dnf* /var/log/yum.* # Adjust storage.conf to enable Fuse storage. RUN sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' /etc/containers/storage.conf RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers; touch /var/lib/shared/overlay-images/images.lock; touch /var/lib/shared/overlay-layers/layers.lock -# Adjust libpod.conf to write logging to a file -RUN sed -i 's/# events_logger = "journald"/events_logger = "file"/g' /usr/share/containers/libpod.conf +ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/containers.conf /etc/containers/ -# Set up environment variables to note that this is -# not starting with usernamespace and default to -# isolate the filesystem with chroot. -ENV _BUILDAH_STARTED_IN_USERNS="" BUILDAH_ISOLATION=chroot +ENV _CONTAINERS_USERNS_CONFIGURED="" diff --git a/contrib/podmanimage/stable/containers.conf b/contrib/podmanimage/stable/containers.conf new file mode 100644 index 000000000..e6b806da3 --- /dev/null +++ b/contrib/podmanimage/stable/containers.conf @@ -0,0 +1,11 @@ +[containers] +netns="host" +userns="host" +ipcns="host" +utsns="host" +cgroupns="host" +cgroups="disabled" +[engine] +cgroup_manager = "cgroupfs" +events_logger="file" +runtime="crun" diff --git a/contrib/podmanimage/stable/manual/Containerfile b/contrib/podmanimage/stable/manual/Containerfile index d76d6d9b4..afc4f5ffd 100644 --- a/contrib/podmanimage/stable/manual/Containerfile +++ b/contrib/podmanimage/stable/manual/Containerfile @@ -30,10 +30,6 @@ RUN yum -y install /tmp/podman-1.7.0-3.fc30.x86_64.rpm fuse-overlayfs --exclude RUN sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' /etc/containers/storage.conf RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers; touch /var/lib/shared/overlay-images/images.lock; touch /var/lib/shared/overlay-layers/layers.lock -# Adjust libpod.conf to write logging to a file -RUN sed -i 's/events_logger = "journald"/events_logger = "file"/g' /usr/share/containers/libpod.conf; mkdir -p /run/systemd/journal +ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/containers.conf /etc/containers/ -# Set up environment variables to note that this is -# not starting with usernamespace and default to -# isolate the filesystem with chroot. -ENV _BUILDAH_STARTED_IN_USERNS="" BUILDAH_ISOLATION=chroot +ENV _CONTAINERS_USERNS_CONFIGURED="" diff --git a/contrib/podmanimage/testing/Dockerfile b/contrib/podmanimage/testing/Dockerfile index a8e7653f6..3a7a0b7f8 100644 --- a/contrib/podmanimage/testing/Dockerfile +++ b/contrib/podmanimage/testing/Dockerfile @@ -13,16 +13,12 @@ FROM fedora:latest # Don't include container-selinux and remove # directories used by yum that are just taking # up space. -RUN useradd build; yum -y update; yum -y reinstall shadow-utils; yum -y install podman fuse-overlayfs --exclude container-selinux --enablerepo updates-testing; rm -rf /var/cache /var/log/dnf* /var/log/yum.* +RUN useradd podman; yum -y update; yum -y reinstall shadow-utils; yum -y install podman fuse-overlayfs --exclude container-selinux --enablerepo updates-testing; rm -rf /var/cache /var/log/dnf* /var/log/yum.* # Adjust storage.conf to enable Fuse storage. RUN sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' /etc/containers/storage.conf RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers; touch /var/lib/shared/overlay-images/images.lock; touch /var/lib/shared/overlay-layers/layers.lock -# Adjust libpod.conf to write logging to a file -RUN sed -i 's/# events_logger = "journald"/events_logger = "file"/g' /usr/share/containers/libpod.conf +ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/containers.conf /etc/containers/ -# Set up environment variables to note that this is -# not starting with usernamespace and default to -# isolate the filesystem with chroot. -ENV _BUILDAH_STARTED_IN_USERNS="" BUILDAH_ISOLATION=chroot +ENV _CONTAINERS_USERNS_CONFIGURED="" diff --git a/contrib/podmanimage/upstream/Dockerfile b/contrib/podmanimage/upstream/Dockerfile index 847097920..3b2f49094 100644 --- a/contrib/podmanimage/upstream/Dockerfile +++ b/contrib/podmanimage/upstream/Dockerfile @@ -17,7 +17,7 @@ ENV GOPATH=/root/podman # to the container. # Finally remove the podman directory and a few other packages # that are needed for building but not running Podman -RUN useradd build; yum -y update; yum -y reinstall shadow-utils; yum -y install --exclude container-selinux \ +RUN useradd podman; yum -y update; yum -y reinstall shadow-utils; yum -y install --exclude container-selinux \ --enablerepo=updates-testing \ btrfs-progs-devel \ containernetworking-cni \ @@ -37,7 +37,7 @@ RUN useradd build; yum -y update; yum -y reinstall shadow-utils; yum -y install libselinux-devel \ make \ pkgconfig \ - runc \ + crun \ fuse-overlayfs \ fuse3 \ containers-common; \ @@ -59,9 +59,6 @@ RUN useradd build; yum -y update; yum -y reinstall shadow-utils; yum -y install mkdir -p /etc/cni/net.d; \ curl -qsSL https://raw.githubusercontent.com/containers/libpod/master/cni/87-podman-bridge.conflist | tee /etc/cni/net.d/99-loopback.conf; \ mkdir -p /usr/share/containers; \ - cp $GOPATH/src/github.com/containers/libpod/libpod.conf /usr/share/containers; \ - # Adjust libpod.conf to write logging to a file - sed -i 's/# events_logger = "journald"/events_logger = "file"/g' /usr/share/containers/libpod.conf; \ rm -rf /root/podman/*; \ yum -y remove git golang go-md2man make; \ yum clean all; @@ -70,7 +67,6 @@ RUN useradd build; yum -y update; yum -y reinstall shadow-utils; yum -y install RUN sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' /etc/containers/storage.conf RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers; touch /var/lib/shared/overlay-images/images.lock; touch /var/lib/shared/overlay-layers/layers.lock -# Set up environment variables to note that this is -# not starting with usernamespace and default to -# isolate the filesystem with chroot. -ENV _BUILDAH_STARTED_IN_USERNS="" BUILDAH_ISOLATION=chroot +ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/containers.conf /etc/containers/ + +ENV _CONTAINERS_USERNS_CONFIGURED="" |