Skip to content

Commit

Permalink
Merge pull request #1882 from daemon1024/revert-multiubuntu
Browse files Browse the repository at this point in the history
revert(multiubuntu): hotpatch back to 18:04 till tests are migrated
  • Loading branch information
DelusionalOptimist authored Oct 23, 2024
2 parents 8dd10c4 + fe70570 commit 095188c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-test-ginkgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- "tests/**"
- "protobuf/**"
- ".github/workflows/ci-test-ginkgo.yml"
- "examples/multiubuntu/build/**"
- "pkg/KubeArmorOperator/**"
- "deployments/helm/**"

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-test-ubi-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- "tests/**"
- "protobuf/**"
- ".github/workflows/ci-test-ginkgo.yml"
- "examples/multiubuntu/build/**"
- "pkg/KubeArmorOperator/**"
- "deployments/helm/**"

Expand Down
26 changes: 9 additions & 17 deletions examples/multiubuntu/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand All @@ -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" ]

0 comments on commit 095188c

Please sign in to comment.