Skip to content

Commit

Permalink
add script to install podman
Browse files Browse the repository at this point in the history
  • Loading branch information
yudong2015 committed Apr 19, 2024
1 parent 5197593 commit 618505c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 13 deletions.
33 changes: 33 additions & 0 deletions base/hack/install_podman.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

ARCH=$(uname -m)

echo $ARCH

if [[ ${ARCH} == 'x86_64' ]]; then
# Install runc for podman
wget https://github.com/opencontainers/runc/releases/download/v1.1.10/runc.amd64 && \
mv runc.amd64 /usr/bin/runc && chmod +x /usr/bin/runc
# Install conmon for podman
wget https://github.com/containers/conmon/releases/download/v2.1.0/conmon.amd64 && \
mv conmon.amd64 /usr/bin/conmon && chmod +x /usr/bin/conmon

elif [[ ${ARCH} == 'aarch64' ]]
then
# Install runc for podman
wget https://github.com/opencontainers/runc/releases/download/v1.1.10/runc.arm64 && \
mv runc.arm64 /usr/bin/runc && chmod +x /usr/bin/runc
# Install conmon for podman
wget https://github.com/containers/conmon/releases/download/v2.1.0/conmon.arm64 && \
mv conmon.arm64 /usr/bin/conmon && chmod +x /usr/bin/conmon
else
echo "do not support this arch"
exit 1
fi

# Install podman
wget https://github.com/containers/podman/archive/refs/tags/v3.4.4.tar.gz && \
tar -zxf v3.4.4.tar.gz && \
cd podman-3.4.4 && make BUILDTAGS="selinux seccomp systemd" 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
14 changes: 1 addition & 13 deletions base/podman/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,8 @@ COPY ./ ./
ENV EXCLUDE_DOCKER 1
RUN ./hack/install_utils.sh && rm -rf ./*

# Install runc for podman
RUN wget https://github.com/opencontainers/runc/releases/download/v1.1.10/runc.arm64 && \
mv runc.arm64 /usr/bin/runc && chmod +x /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 wget https://github.com/containers/podman/archive/refs/tags/v3.4.4.tar.gz && \
tar -zxf 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
RUN ./hack/install_podman.sh

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

0 comments on commit 618505c

Please sign in to comment.