Skip to content

Commit c075190

Browse files
lijianguoduanhongyi
authored andcommitted
chore(passport): exclude cryptography
1 parent 9ebc750 commit c075190

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

rootfs/Dockerfile

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

rootfs/Dockerfile.test

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ENV PGDATA /var/lib/postgresql/12
77

88
ENV PATH="/app/.venv/bin:${PATH}"
99

10-
RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/main >>/etc/apk/repositories \
10+
RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories \
1111
&& apk add --update --virtual .build-deps \
1212
gcc \
1313
rust \
@@ -20,14 +20,12 @@ RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/main >>/etc/apk/repositories
2020
&& source /app/.venv/bin/activate \
2121
&& pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt \
2222
&& pip3 install --disable-pip-version-check --no-cache-dir -r /app/dev_requirements.txt \
23-
&& runDeps="$( \
24-
scanelf --needed --nobanner --format '%n#p' --recursive /app/.venv \
23+
&& find /app/.venv/lib/ -type f -executable ! -path '*/cryptography*' -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
2524
| tr ',' '\n' \
2625
| sort -u \
2726
| awk 'system("[ -e /app/.venv/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
28-
)" \
27+
| xargs -rt apk add --no-cache --virtual .python-rundeps \
2928
&& apk add --update --virtual .controller-rundeps \
30-
$runDeps \
3129
git \
3230
mercurial \
3331
ca-certificates \

0 commit comments

Comments
 (0)