Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert(multiubuntu): hotpatch back to 18:04 till tests are migrated #1882

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/**"
rksharma95 marked this conversation as resolved.
Show resolved Hide resolved
- "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" ]
Loading