Skip to content

Commit

Permalink
install podman 3.4.4 on centos7
Browse files Browse the repository at this point in the history
  • Loading branch information
yudong2015 committed Apr 18, 2024
1 parent db30007 commit ed22cd0
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions base/podman/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ RUN yum install -y epel-release ca-certificates && \
openssl-devel \
perl-devel \
zlib-devel \
systemd-devel \
gpgme-devel \
btrfs-progs-devel \
libassuan-devel \
device-mapper-devel \
libseccomp-devel \
go \
go-md2man \
python-pip \
java-1.8.0-openjdk && \
yum -y clean all --enablerepo='*'
Expand Down Expand Up @@ -56,11 +64,19 @@ COPY ./ ./
ENV EXCLUDE_DOCKER 1
RUN ./hack/install_utils.sh && rm -rf ./*

# Install runc for podman
RUN git clone -b v1.1.12 https://github.com/opencontainers/runc.git $(go env GOPATH)/src/github.com/opencontainers/runc && \
cd $(go env GOPATH)/src/github.com/opencontainers/runc && make BUILDTAGS="selinux seccomp" && mv runc /usr/bin/runc

# Install conmon for podman
RUN wget https://github.com/containers/conmon/releases/download/v2.1.0/conmon.amd64 && mv conmon.amd64 /usr/bin/conmon && chmod +x /usr/bin/conmon

# Install podman
RUN curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_7/devel:kubic:libcontainers:stable.repo && \
yum -y install podman fuse-overlayfs && \
ln -s /usr/bin/podman /usr/bin/docker && \
yum -y clean all --enablerepo='*'
RUN wget https://github.com/containers/podman/archive/refs/tags/v3.4.4.tar.gz && \
tar -zxvf v3.4.4.tar.gz && \
cd podman-3.4.4 && make BUILDTAGS="selinux seccomp systemd cni" PREFIX=/usr && make install PREFIX=/usr && \
cd .. && rm v3.4.4.tar.gz && rm -rf podman-3.4.4 && rm -rf go && \
ln -s /usr/bin/podman /usr/bin/docker

COPY storage.conf /etc/containers/storage.conf
COPY containers.conf /etc/containers/containers.conf
Expand Down

0 comments on commit ed22cd0

Please sign in to comment.