Skip to content

Commit 618505c

Browse files
committed
add script to install podman
1 parent 5197593 commit 618505c

File tree

2 files changed

+34
-13
lines changed

2 files changed

+34
-13
lines changed

base/hack/install_podman.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
ARCH=$(uname -m)
4+
5+
echo $ARCH
6+
7+
if [[ ${ARCH} == 'x86_64' ]]; then
8+
# Install runc for podman
9+
wget https://github.com/opencontainers/runc/releases/download/v1.1.10/runc.amd64 && \
10+
mv runc.amd64 /usr/bin/runc && chmod +x /usr/bin/runc
11+
# Install conmon for podman
12+
wget https://github.com/containers/conmon/releases/download/v2.1.0/conmon.amd64 && \
13+
mv conmon.amd64 /usr/bin/conmon && chmod +x /usr/bin/conmon
14+
15+
elif [[ ${ARCH} == 'aarch64' ]]
16+
then
17+
# Install runc for podman
18+
wget https://github.com/opencontainers/runc/releases/download/v1.1.10/runc.arm64 && \
19+
mv runc.arm64 /usr/bin/runc && chmod +x /usr/bin/runc
20+
# Install conmon for podman
21+
wget https://github.com/containers/conmon/releases/download/v2.1.0/conmon.arm64 && \
22+
mv conmon.arm64 /usr/bin/conmon && chmod +x /usr/bin/conmon
23+
else
24+
echo "do not support this arch"
25+
exit 1
26+
fi
27+
28+
# Install podman
29+
wget https://github.com/containers/podman/archive/refs/tags/v3.4.4.tar.gz && \
30+
tar -zxf v3.4.4.tar.gz && \
31+
cd podman-3.4.4 && make BUILDTAGS="selinux seccomp systemd" PREFIX=/usr && make install PREFIX=/usr && \
32+
cd .. && rm v3.4.4.tar.gz && rm -rf podman-3.4.4 && rm -rf go && \
33+
ln -s /usr/bin/podman /usr/bin/docker

base/podman/Dockerfile

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,8 @@ COPY ./ ./
6464
ENV EXCLUDE_DOCKER 1
6565
RUN ./hack/install_utils.sh && rm -rf ./*
6666

67-
# Install runc for podman
68-
RUN wget https://github.com/opencontainers/runc/releases/download/v1.1.10/runc.arm64 && \
69-
mv runc.arm64 /usr/bin/runc && chmod +x /usr/bin/runc
70-
71-
# Install conmon for podman
72-
RUN wget https://github.com/containers/conmon/releases/download/v2.1.0/conmon.amd64 && \
73-
mv conmon.amd64 /usr/bin/conmon && chmod +x /usr/bin/conmon
74-
7567
# Install podman
76-
RUN wget https://github.com/containers/podman/archive/refs/tags/v3.4.4.tar.gz && \
77-
tar -zxf v3.4.4.tar.gz && \
78-
cd podman-3.4.4 && make BUILDTAGS="selinux seccomp systemd cni" PREFIX=/usr && make install PREFIX=/usr && \
79-
cd .. && rm v3.4.4.tar.gz && rm -rf podman-3.4.4 && rm -rf go && \
80-
ln -s /usr/bin/podman /usr/bin/docker
68+
RUN ./hack/install_podman.sh
8169

8270
COPY storage.conf /etc/containers/storage.conf
8371
COPY containers.conf /etc/containers/containers.conf

0 commit comments

Comments
 (0)