From d1e9a9dcd2456c6468c07b85ee2ff8a583609beb Mon Sep 17 00:00:00 2001 From: Felix Sun <147002470+fs895472@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:55:05 -0500 Subject: [PATCH 1/2] Update Dockerfile --- Dockerfile | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 81369c3..c65ab61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,21 @@ -FROM sbo-cicd-docker-release-local.usw1.packages.broadcom.com/broadcom-custom-images/redhat/ubi/buildah:1.23.2 +FROM quay.io/podman/stable USER root -RUN dnf install -y podman-docker && dnf install -y go +RUN dnf -y update; yum -y reinstall shadow-utils; +RUN echo "[jfrog-cli]" > jfrog-cli.repo && echo "name=jfrog-cli" >> jfrog-cli.repo && echo "baseurl=https://releases.jfrog.io/artifactory/jfrog-rpms" >> jfrog-cli.repo && echo "enabled=1" >> jfrog-cli.repo && rpm --import https://releases.jfrog.io/artifactory/jfrog-gpg-public/jfrog_public_gpg.key && mv jfrog-cli.repo /etc/yum.repos.d/ +RUN dnf -y install buildah slirp4netns iputils podman-docker python3.11 go maven-openjdk11.noarch jfrog-cli git fuse-overlayfs --exclude container-selinux + RUN curl -L https://mirror.openshift.com/pub/openshift-v4/clients/helm/latest/helm-linux-amd64 -o /usr/bin/helm && chmod +x /usr/bin/helm +RUN userdel podman && useradd buildah && usermod -u 1000 buildah; \ +echo buildah:10000:65536 > /etc/subuid; \ +echo buildah:10000:65536 > /etc/subgid; +COPY --chown=buildah:buildah ../../bin/linux-amd64/gotpl /usr/bin/gotpl + +COPY podman-containers.conf /home/buildah/.config/containers/containers.conf + +RUN chown -R buildah:buildah /home/buildah + +USER buildah RUN go install github.com/brendanjryan/k8split@latest -RUN curl -SL https://github.com/docker/compose/releases/download/v2.23.1/docker-compose-linux-x86_64 -o /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose -COPY --chown=default:default bin/linux-amd64/gotpl /usr/bin/gotpl -USER buildah \ No newline at end of file +ENV PATH="${PATH}:/home/buildah/go/bin:/home/buildah/.local/bin" +RUN python3.11 -m ensurepip +RUN pip3.11 install podman-compose --user From f179815c43a13adff4d7dc307544bbc79dee2a8b Mon Sep 17 00:00:00 2001 From: Felix Sun <147002470+fs895472@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:56:23 -0500 Subject: [PATCH 2/2] add podman-containers config file --- podman-containers.conf | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 podman-containers.conf diff --git a/podman-containers.conf b/podman-containers.conf new file mode 100644 index 0000000..4634964 --- /dev/null +++ b/podman-containers.conf @@ -0,0 +1,5 @@ +[containers] +volumes = [ + "/proc:/proc", +] +default_sysctls = [] \ No newline at end of file