github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/contrib/podmanimage/upstream/Dockerfile (about) 1 # git/Dockerfile 2 # 3 # Build a Podman container image from the latest 4 # upstream version of Podman on GitHub. 5 # https://github.com/containers/podman 6 # This image can be used to create a secured container 7 # that runs safely with privileges within the container. 8 # The containers created by this image also come with a 9 # Podman development environment in /root/podman. 10 # 11 FROM registry.fedoraproject.org/fedora:latest 12 ENV GOPATH=/root/podman 13 14 # Install the software required to build Podman. 15 # Then create a directory and clone from the Podman 16 # GitHub repository, make and install Podman 17 # to the container. 18 # Finally remove the podman directory and a few other packages 19 # that are needed for building but not running Podman 20 RUN useradd podman; yum -y update; yum -y reinstall shadow-utils; yum -y install --exclude container-selinux \ 21 --enablerepo=updates-testing \ 22 btrfs-progs-devel \ 23 containernetworking-cni \ 24 conmon \ 25 device-mapper-devel \ 26 git \ 27 glib2-devel \ 28 glibc-devel \ 29 glibc-static \ 30 go \ 31 golang-github-cpuguy83-md2man \ 32 gpgme-devel \ 33 iptables \ 34 libassuan-devel \ 35 libgpg-error-devel \ 36 libseccomp-devel \ 37 libselinux-devel \ 38 make \ 39 pkgconfig \ 40 crun \ 41 fuse-overlayfs \ 42 fuse3 \ 43 containers-common; \ 44 mkdir /root/podman; \ 45 git clone https://github.com/containers/podman /root/podman/src/github.com/containers/podman; \ 46 cd /root/podman/src/github.com/containers/podman; \ 47 make BUILDTAGS="selinux seccomp"; \ 48 make install PREFIX=/usr; \ 49 cd /root/podman; \ 50 git clone https://github.com/containers/conmon /root/podman/conmon; \ 51 cd conmon; \ 52 make; \ 53 install -D -m 755 bin/conmon /usr/libexec/podman/conmon; \ 54 git clone https://github.com/containernetworking/plugins.git $GOPATH/src/github.com/containernetworking/plugins; \ 55 cd $GOPATH/src/github.com/containernetworking/plugins; \ 56 ./build_linux.sh; \ 57 mkdir -p /usr/libexec/cni; \ 58 \cp -fR bin/* /usr/libexec/cni; \ 59 mkdir -p /etc/cni/net.d; \ 60 curl -qsSL https://raw.githubusercontent.com/containers/libpod/master/cni/87-podman-bridge.conflist | tee /etc/cni/net.d/99-loopback.conf; \ 61 mkdir -p /usr/share/containers; \ 62 rm -rf /root/podman/*; \ 63 yum -y remove git golang go-md2man make; \ 64 yum clean all; 65 66 ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/containers.conf /etc/containers/ 67 68 # chmod containers.conf and adjust storage.conf to enable Fuse storage. 69 RUN chmod 644 /etc/containers/containers.conf; sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' -e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' /etc/containers/storage.conf 70 RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers /var/lib/shared/vfs-images /var/lib/shared/vfs-layers; touch /var/lib/shared/overlay-images/images.lock; touch /var/lib/shared/overlay-layers/layers.lock; touch /var/lib/shared/vfs-images/images.lock; touch /var/lib/shared/vfs-layers/layers.lock 71 72 ENV _CONTAINERS_USERNS_CONFIGURED=""