Skip to content

Commit 0009274

Browse files
committed
fix: revert Dockerfile to COPY-only (base image has no shell)
Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent d7ae186 commit 0009274

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

demos/supply-chain/hl-unikraft/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
ARG BASE=ghcr.io/hyperlight-dev/hyperlight-unikraft/python-base:latest
1010
FROM ${BASE} AS rootfs
1111

12-
# Install the typosquatted package where Python can find it
13-
RUN SITE=$(python3 -c 'import site; print(site.getsitepackages()[0])') && \
14-
mkdir -p "$SITE/reqeusts"
15-
COPY reqeusts/ /tmp/reqeusts/
16-
RUN SITE=$(python3 -c 'import site; print(site.getsitepackages()[0])') && \
17-
cp -r /tmp/reqeusts/* "$SITE/reqeusts/" && rm -rf /tmp/reqeusts
12+
# Install the typosquatted package into site-packages.
13+
# The base image is a shell-less rootfs so RUN is not available; COPY only.
14+
COPY reqeusts/ /usr/local/lib/python3.12/site-packages/reqeusts/
1815

1916
# Install the victim application
2017
COPY victim_app.py /victim_app.py

0 commit comments

Comments
 (0)