Skip to content

Commit d4ebced

Browse files
author
lijianguo
committed
chore(passport): exclude cryptography rundeps
1 parent 396f804 commit d4ebced

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

rootfs/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ RUN apk add --update --virtual .build-deps \
1414
&& python3 -m venv /app/.venv \
1515
&& source /app/.venv/bin/activate \
1616
&& pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt \
17-
&& runDeps="$( \
18-
scanelf --needed --nobanner --format '%n#p' --recursive /app/.venv \
17+
&& find /app/.venv/lib/ -type f -executable ! -path '*/cryptography*' -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
1918
| tr ',' '\n' \
2019
| sort -u \
2120
| awk 'system("[ -e /app/.venv/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
22-
)" \
21+
| xargs -rt apk add --no-cache --virtual .python-rundeps \
2322
&& apk add --update --virtual .helmbroker-rundeps \
2423
$runDeps \
2524
ca-certificates \

rootfs/Dockerfile.test

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ RUN apk add --update --virtual .build-deps \
1515
&& source /app/.venv/bin/activate \
1616
&& pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt \
1717
&& pip3 install --disable-pip-version-check --no-cache-dir -r /app/dev_requirements.txt \
18-
&& runDeps="$( \
19-
scanelf --needed --nobanner --format '%n#p' --recursive /app/.venv \
18+
&& find /app/.venv/lib/ -type f -executable ! -path '*/cryptography*' -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
2019
| tr ',' '\n' \
2120
| sort -u \
2221
| awk 'system("[ -e /app/.venv/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
23-
)" \
22+
| xargs -rt apk add --no-cache --virtual .python-rundeps \
2423
&& apk add --update --virtual .helmbroker-rundeps \
2524
$runDeps \
2625
git \

0 commit comments

Comments
 (0)