From ec96e4de8afed3b1274192aada589d30061e65c2 Mon Sep 17 00:00:00 2001 From: jackyu Date: Fri, 19 Apr 2024 01:37:54 +0800 Subject: [PATCH 1/2] install podman 3.4.4 on centos7 --- base/hack/install_podman.sh | 33 +++++++++++++++++++++++++++++++++ base/podman/Dockerfile | 17 +++++++++++------ 2 files changed, 44 insertions(+), 6 deletions(-) create mode 100755 base/hack/install_podman.sh diff --git a/base/hack/install_podman.sh b/base/hack/install_podman.sh new file mode 100755 index 0000000..823b13b --- /dev/null +++ b/base/hack/install_podman.sh @@ -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 diff --git a/base/podman/Dockerfile b/base/podman/Dockerfile index 8934da6..eb46a81 100644 --- a/base/podman/Dockerfile +++ b/base/podman/Dockerfile @@ -17,12 +17,20 @@ 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='*' RUN wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz && \ - tar zxvf git-2.9.5.tar.gz --no-same-owner && \ + tar zxf git-2.9.5.tar.gz --no-same-owner && \ cd git-2.9.5 && \ make configure && \ ./configure prefix=/usr/local/git/ && \ @@ -54,13 +62,10 @@ ENV PATH $PATH:/usr/bin/sonar-scanner-$SONAR_SCANNER_VERSION-linux/bin COPY ./ ./ ENV EXCLUDE_DOCKER 1 -RUN ./hack/install_utils.sh && rm -rf ./* +RUN ./hack/install_utils.sh # 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 ./hack/install_podman.sh && rm -rf ./* COPY storage.conf /etc/containers/storage.conf COPY containers.conf /etc/containers/containers.conf From 8540631c7e3a3dad238b330b239e9c85ce6d76ac Mon Sep 17 00:00:00 2001 From: jackyu Date: Sun, 21 Apr 2024 22:02:15 +0800 Subject: [PATCH 2/2] update base image to 3.3.2 --- dotnet/Dockerfile | 2 +- go/Dockerfile | 2 +- go/podman/Dockerfile | 2 +- gradle/Dockerfile | 2 +- gradle/podman/Dockerfile | 2 +- maven/Dockerfile | 2 +- maven/podman/Dockerfile | 2 +- nodejs/Dockerfile | 2 +- nodejs/podman/Dockerfile | 2 +- python/Dockerfile | 2 +- python/podman/Dockerfile | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dotnet/Dockerfile b/dotnet/Dockerfile index 6d7f80b..9db0a18 100644 --- a/dotnet/Dockerfile +++ b/dotnet/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0 +FROM kubespheredev/builder-base:v3.3.2 RUN yum install -y krb5-libs libicu openssl-libs compat-openssl10 libgdiplus libstdc++-devel devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils diff --git a/go/Dockerfile b/go/Dockerfile index cd374e9..f261db5 100644 --- a/go/Dockerfile +++ b/go/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0 +FROM kubespheredev/builder-base:v3.3.2 RUN yum -y groupinstall 'Development Tools' && yum -y clean all --enablerepo='*' diff --git a/go/podman/Dockerfile b/go/podman/Dockerfile index c4ffea5..025231f 100644 --- a/go/podman/Dockerfile +++ b/go/podman/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0-podman +FROM kubespheredev/builder-base:v3.3.2-podman RUN yum -y groupinstall 'Development Tools' && yum -y clean all --enablerepo='*' diff --git a/gradle/Dockerfile b/gradle/Dockerfile index 1299846..747d99b 100644 --- a/gradle/Dockerfile +++ b/gradle/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0 +FROM kubespheredev/builder-base:v3.3.2 # java ENV JAVA_VERSIOIN 1.8.0 diff --git a/gradle/podman/Dockerfile b/gradle/podman/Dockerfile index d03be55..a85f2f7 100644 --- a/gradle/podman/Dockerfile +++ b/gradle/podman/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0-podman +FROM kubespheredev/builder-base:v3.3.2-podman # gradle6 ENV GRADLE_VERSION=6.9.1 diff --git a/maven/Dockerfile b/maven/Dockerfile index 14c7924..7c23963 100644 --- a/maven/Dockerfile +++ b/maven/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0 +FROM kubespheredev/builder-base:v3.3.2 ARG JDK_VERSION 1.8.0 ARG JDK_HOME /usr/lib/jvm/java-${JDK_VERSION}-openjdk diff --git a/maven/podman/Dockerfile b/maven/podman/Dockerfile index 771eec0..d4e56ae 100644 --- a/maven/podman/Dockerfile +++ b/maven/podman/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0-podman +FROM kubespheredev/builder-base:v3.3.2-podman ARG JDK_VERSION 1.8.0 ARG JDK_HOME /usr/lib/jvm/java-${JDK_VERSION}-openjdk diff --git a/nodejs/Dockerfile b/nodejs/Dockerfile index 183fe0f..1c23c2c 100644 --- a/nodejs/Dockerfile +++ b/nodejs/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0 +FROM kubespheredev/builder-base:v3.3.2 ENV NODE_VERSION 10.16.3 diff --git a/nodejs/podman/Dockerfile b/nodejs/podman/Dockerfile index a91fb7d..318a9cb 100644 --- a/nodejs/podman/Dockerfile +++ b/nodejs/podman/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0-podman +FROM kubespheredev/builder-base:v3.3.2-podman ENV NODE_VERSION 10.16.3 diff --git a/python/Dockerfile b/python/Dockerfile index bbe20c1..856d4aa 100644 --- a/python/Dockerfile +++ b/python/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0 +FROM kubespheredev/builder-base:v3.3.2 # python3 ENV PYTHON_VERSION=3.7.11 diff --git a/python/podman/Dockerfile b/python/podman/Dockerfile index 112bda2..8240086 100644 --- a/python/podman/Dockerfile +++ b/python/podman/Dockerfile @@ -1,4 +1,4 @@ -FROM kubespheredev/builder-base:v3.1.0-podman +FROM kubespheredev/builder-base:v3.3.2-podman # python3 ENV PYTHON_VERSION=3.7.11