Skip to content

Commit

Permalink
chore(multiubuntu): keep binaries in root as well
Browse files Browse the repository at this point in the history
Signed-off-by: daemon1024 <[email protected]>
  • Loading branch information
daemon1024 committed Oct 22, 2024
1 parent 9b41e61 commit e42e3e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/multiubuntu/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2021 Authors of KubeArmor

FROM ubuntu:22.04 as builder
FROM ubuntu:22.04 AS builder

RUN apt-get update && apt install -y gcc python3 pipx python3-venv
COPY helloworld/ /helloworld/
Expand Down Expand Up @@ -47,6 +47,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,6 +62,7 @@ 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ spec:
process:
matchDirectories:
- dir: /sbin/
- dir: /usr/sbin/
action:
Block

0 comments on commit e42e3e3

Please sign in to comment.