From 3a7d8dbb73bcab45ac3ed20e44a92c97ec781e99 Mon Sep 17 00:00:00 2001 From: daemon1024 Date: Wed, 23 Oct 2024 15:36:24 +0530 Subject: [PATCH 1/2] revert(multiubuntu): hotpatch back to 18:04 till tests are migrated Signed-off-by: daemon1024 --- examples/multiubuntu/build/Dockerfile | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/examples/multiubuntu/build/Dockerfile b/examples/multiubuntu/build/Dockerfile index 1dd3295a9..d0897516a 100644 --- a/examples/multiubuntu/build/Dockerfile +++ b/examples/multiubuntu/build/Dockerfile @@ -1,36 +1,28 @@ # SPDX-License-Identifier: Apache-2.0 -# Copyright 2021 Authors of KubeArmor +# Copyright 2024 Authors of KubeArmor -FROM ubuntu:22.04 as builder +FROM ubuntu:18.04 AS builder -RUN apt-get update && apt install -y gcc python3 pipx python3-venv +RUN apt-get update && apt install -y gcc COPY helloworld/ /helloworld/ COPY readwrite/ /readwrite/ RUN gcc -o hello /helloworld/hello.c RUN gcc -o readwriter /readwrite/readwrite.c -RUN pipx install fee - -ENV PATH=$PATH:/root/.local/bin - -RUN fee /bin/ls > /ls.py - - -FROM ubuntu:22.04 +FROM ubuntu:18.04 RUN apt-get update RUN apt-get install -y net-tools iputils-ping telnet ssh tcpdump nmap dsniff arping -RUN apt-get install -y curl iperf3 netperf ethtool python3 python3-scapy python3-flask pipx python3-venv +RUN apt-get install -y curl iperf3 netperf ethtool python-scapy python-pip RUN apt-get install -y iptables bridge-utils apache2 vim RUN apt-get clean RUN apt-get autoremove -y RUN rm -rf /var/lib/{apt,dpkg,cache,log}/ - -RUN ln -s $(which python3) /usr/bin/python +RUN pip install flask ADD flask/http_test.py / COPY entrypoint.sh /entrypoint.sh @@ -47,6 +39,7 @@ RUN echo "key file" >> /credentials/keys/priv.key RUN useradd --create-home --shell /bin/bash user1 RUN echo 'user1:passwd1' | chpasswd +COPY --from=builder /hello /hello COPY --from=builder /hello /home/user1/hello RUN chown user1:user1 /home/user1/hello @@ -61,9 +54,8 @@ RUN chown user1:user1 /home/user1/dir1/key1.txt RUN echo "other file" >> /home/user1/otherfile.txt RUN chown user1:user1 /home/user1/otherfile.txt +COPY --from=builder /readwriter /readwrite COPY --from=builder /readwriter /home/user1/readwrite -RUN chown user1:user1 /home/user1/readwrite - -COPY --from=builder /ls.py /ls.py +RUN chown user1:user1 /home/user1/readwrite CMD [ "/entrypoint.sh" ] \ No newline at end of file From fe7057031278a9d0afa70fba1de2123e586b9015 Mon Sep 17 00:00:00 2001 From: daemon1024 Date: Wed, 23 Oct 2024 15:44:20 +0530 Subject: [PATCH 2/2] chore(ci): trigger test on multiubuntu image updates Signed-off-by: daemon1024 --- .github/workflows/ci-test-ginkgo.yml | 1 + .github/workflows/ci-test-ubi-image.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci-test-ginkgo.yml b/.github/workflows/ci-test-ginkgo.yml index 553b5e68f..6b1752963 100644 --- a/.github/workflows/ci-test-ginkgo.yml +++ b/.github/workflows/ci-test-ginkgo.yml @@ -17,6 +17,7 @@ on: - "tests/**" - "protobuf/**" - ".github/workflows/ci-test-ginkgo.yml" + - "examples/multiubuntu/build/**" - "pkg/KubeArmorOperator/**" - "deployments/helm/**" diff --git a/.github/workflows/ci-test-ubi-image.yml b/.github/workflows/ci-test-ubi-image.yml index 0c9978963..a1ea9594b 100644 --- a/.github/workflows/ci-test-ubi-image.yml +++ b/.github/workflows/ci-test-ubi-image.yml @@ -17,6 +17,7 @@ on: - "tests/**" - "protobuf/**" - ".github/workflows/ci-test-ginkgo.yml" + - "examples/multiubuntu/build/**" - "pkg/KubeArmorOperator/**" - "deployments/helm/**"