Skip to content

Commit eac856d

Browse files
authored
build: uninstall Python pip (#1241)
1 parent f7535ec commit eac856d

8 files changed

Lines changed: 68 additions & 59 deletions

File tree

docker-jans-auth-server/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
FROM bellsoft/liberica-openjre-alpine:11.0.13-8
1+
FROM bellsoft/liberica-openjre-alpine:11.0.15
22

33
# ===============
44
# Alpine packages
55
# ===============
66

77
RUN apk update \
88
&& apk upgrade \
9-
&& apk add --no-cache openssl py3-pip tini curl bash py3-cryptography py3-psycopg2 \
10-
&& apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/community py3-grpcio \
11-
&& apk add --no-cache --virtual build-deps wget git zip \
9+
&& apk add --no-cache openssl python3 tini curl bash py3-cryptography py3-psycopg2 py3-grpcio \
10+
&& apk add --no-cache --virtual .build-deps wget git zip \
1211
&& mkdir -p /usr/java/latest \
1312
&& ln -sf /usr/lib/jvm/jre /usr/java/latest/jre
1413

@@ -56,7 +55,7 @@ RUN /opt/jython/bin/pip uninstall -y pip
5655
# ===========
5756

5857
ENV CN_VERSION=1.0.0-SNAPSHOT
59-
ENV CN_BUILD_DATE='2022-03-28 08:56'
58+
ENV CN_BUILD_DATE='2022-04-21 10:27'
6059
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-auth-server/${CN_VERSION}/jans-auth-server-${CN_VERSION}.war
6160

6261
# Install Jans Auth
@@ -109,14 +108,16 @@ RUN git clone --filter blob:none --no-checkout https://github.com/GluuFederation
109108
# ======
110109

111110
COPY requirements.txt /app/requirements.txt
112-
RUN pip3 install -U pip wheel \
113-
&& pip3 install --no-cache-dir --default-timeout=300 -r /app/requirements.txt
111+
RUN python3 -m ensurepip \
112+
&& pip3 install --no-cache-dir -U pip wheel \
113+
&& pip3 install --no-cache-dir --default-timeout=300 -r /app/requirements.txt \
114+
&& pip3 uninstall -y pip wheel
114115

115116
# =======
116117
# Cleanup
117118
# =======
118119

119-
RUN apk del build-deps \
120+
RUN apk del .build-deps \
120121
&& rm -rf /var/cache/apk/*
121122

122123
# =======

docker-jans-certmanager/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
FROM bellsoft/liberica-openjre-alpine:11.0.13-8
1+
FROM bellsoft/liberica-openjre-alpine:11.0.15
22

33
# ===============
44
# Alpine packages
55
# ===============
66

77
RUN apk update \
88
&& apk upgrade \
9-
&& apk add --no-cache openssl py3-pip curl tini py3-cryptography py3-psycopg2 \
10-
&& apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/community py3-grpcio \
11-
&& apk add --no-cache --virtual build-deps wget git \
9+
&& apk add --no-cache openssl python3 curl tini py3-cryptography py3-psycopg2 py3-grpcio \
10+
&& apk add --no-cache --virtual .build-deps wget git \
1211
&& mkdir -p /usr/java/latest \
1312
&& ln -sf /usr/lib/jvm/jre /usr/java/latest/jre
1413

@@ -18,7 +17,7 @@ RUN apk update \
1817

1918
# JAR files required to generate OpenID Connect keys
2019
ENV CN_VERSION=1.0.0-SNAPSHOT
21-
ENV CN_BUILD_DATE='2022-03-23 18:17'
20+
ENV CN_BUILD_DATE='2022-04-21 10:21'
2221
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-auth-client/${CN_VERSION}/jans-auth-client-${CN_VERSION}-jar-with-dependencies.jar
2322

2423
RUN wget -q ${CN_SOURCE_URL} -P /app/javalibs/
@@ -39,14 +38,16 @@ RUN wget -q ${CN_SOURCE_URL} -P /app/javalibs/
3938
# ======
4039

4140
COPY requirements.txt /app/requirements.txt
42-
RUN pip3 install --no-cache-dir -U pip wheel \
43-
&& pip3 install --no-cache-dir -r /app/requirements.txt
41+
RUN python3 -m ensurepip \
42+
&& pip3 install --no-cache-dir -U pip wheel \
43+
&& pip3 install --no-cache-dir -r /app/requirements.txt \
44+
&& pip3 uninstall -y pip wheel
4445

4546
# =======
4647
# Cleanup
4748
# =======
4849

49-
RUN apk del build-deps \
50+
RUN apk del .build-deps \
5051
&& rm -rf /var/cache/apk/*
5152

5253
# =======

docker-jans-client-api/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
FROM bellsoft/liberica-openjre-alpine:11.0.13-8
1+
FROM bellsoft/liberica-openjre-alpine:11.0.15
22

33
# ===============
44
# Alpine packages
55
# ===============
66

77
RUN apk update \
88
&& apk upgrade \
9-
&& apk add --no-cache openssl py3-pip tini curl py3-cryptography py3-psycopg2 \
10-
&& apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/community py3-grpcio \
11-
&& apk add --no-cache --virtual build-deps unzip wget git \
9+
&& apk add --no-cache openssl python3 tini curl py3-cryptography py3-psycopg2 py3-grpcio \
10+
&& apk add --no-cache --virtual .build-deps unzip wget git \
1211
&& mkdir -p /usr/java/latest \
1312
&& ln -sf /usr/lib/jvm/jre /usr/java/latest/jre
1413

@@ -17,7 +16,7 @@ RUN apk update \
1716
# ==========
1817

1918
ENV CN_VERSION=1.0.0-SNAPSHOT
20-
ENV CN_BUILD_DATE='2022-03-23 08:49'
19+
ENV CN_BUILD_DATE='2022-04-21 08:51'
2120
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-client-api-server/${CN_VERSION}/jans-client-api-server-${CN_VERSION}-distribution.zip
2221

2322
RUN wget -q ${CN_SOURCE_URL} -O /tmp/client-api.zip \
@@ -33,14 +32,16 @@ EXPOSE 8443 8444
3332
# ======
3433

3534
COPY requirements.txt /app/requirements.txt
36-
RUN pip3 install -U pip wheel \
37-
&& pip3 install --no-cache-dir -r /app/requirements.txt
35+
RUN python3 -m ensurepip \
36+
&& pip3 install --no-cache-dir -U pip wheel \
37+
&& pip3 install --no-cache-dir -r /app/requirements.txt \
38+
&& pip3 uninstall -y pip wheel
3839

3940
# =======
4041
# Cleanup
4142
# =======
4243

43-
RUN apk del build-deps \
44+
RUN apk del .build-deps \
4445
&& rm -rf /var/cache/apk/*
4546

4647
# =======

docker-jans-config-api/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
FROM bellsoft/liberica-openjre-alpine:11.0.13-8
1+
FROM bellsoft/liberica-openjre-alpine:11.0.15
22

33
# ===============
44
# Alpine packages
55
# ===============
66

77
RUN apk update \
88
&& apk upgrade \
9-
&& apk add --no-cache openssl py3-pip tini curl py3-cryptography py3-psycopg2 \
10-
&& apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/community py3-grpcio \
11-
&& apk add --no-cache --virtual build-deps wget git zip \
9+
&& apk add --no-cache openssl python3 tini curl py3-cryptography py3-psycopg2 py3-grpcio \
10+
&& apk add --no-cache --virtual .build-deps wget git zip \
1211
&& mkdir -p /usr/java/latest \
1312
&& ln -sf /usr/lib/jvm/jre /usr/java/latest/jre
1413

@@ -33,7 +32,7 @@ RUN wget -q https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/${JETTY_
3332
# ==========
3433

3534
ENV CN_VERSION=1.0.0-SNAPSHOT
36-
ENV CN_BUILD_DATE='2022-03-28 10:22'
35+
ENV CN_BUILD_DATE='2022-04-21 11:27'
3736
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-config-api-server/${CN_VERSION}/jans-config-api-server-${CN_VERSION}.war
3837

3938
# Install Jans Config API
@@ -77,14 +76,16 @@ RUN wget -q ${ADMIN_UI_SOURCE_URL} -O /usr/share/java/admin-ui-plugin.jar
7776
# ======
7877

7978
COPY requirements.txt /app/requirements.txt
80-
RUN pip3 install -U pip wheel \
81-
&& pip3 install --no-cache-dir --default-timeout=300 -r /app/requirements.txt
79+
RUN python3 -m ensurepip \
80+
&& pip3 install --no-cache-dir -U pip wheel \
81+
&& pip3 install --no-cache-dir --default-timeout=300 -r /app/requirements.txt \
82+
&& pip3 uninstall -y pip wheel
8283

8384
# =======
8485
# Cleanup
8586
# =======
8687

87-
RUN apk del build-deps \
88+
RUN apk del .build-deps \
8889
&& rm -rf /var/cache/apk/*
8990

9091
# =======

docker-jans-configurator/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
FROM bellsoft/liberica-openjre-alpine:11.0.13-8
1+
FROM bellsoft/liberica-openjre-alpine:11.0.15
22

33
# ===============
44
# Alpine packages
55
# ===============
66

77
RUN apk update \
88
&& apk upgrade \
9-
&& apk add --no-cache openssl py3-pip curl tini py3-cryptography py3-psycopg2 \
10-
&& apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/community py3-grpcio \
11-
&& apk add --no-cache --virtual build-deps wget git \
9+
&& apk add --no-cache openssl python3 curl tini py3-cryptography py3-psycopg2 py3-grpcio \
10+
&& apk add --no-cache --virtual .build-deps wget git \
1211
&& mkdir -p /usr/java/latest \
1312
&& ln -sf /usr/lib/jvm/jre /usr/java/latest/jre
1413

@@ -18,7 +17,7 @@ RUN apk update \
1817

1918
# JAR files required to generate OpenID Connect keys
2019
ENV CN_VERSION=1.0.0-SNAPSHOT
21-
ENV CN_BUILD_DATE='2022-03-23 18:17'
20+
ENV CN_BUILD_DATE='2022-04-21 10:21'
2221
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-auth-client/${CN_VERSION}/jans-auth-client-${CN_VERSION}-jar-with-dependencies.jar
2322

2423
RUN wget -q ${CN_SOURCE_URL} -P /app/javalibs/
@@ -38,14 +37,16 @@ RUN wget -q ${CN_SOURCE_URL} -P /app/javalibs/
3837
# ======
3938

4039
COPY requirements.txt /app/requirements.txt
41-
RUN pip3 install --no-cache-dir -U pip wheel \
42-
&& pip3 install --no-cache-dir -r /app/requirements.txt
40+
RUN python3 -m ensurepip \
41+
&& pip3 install --no-cache-dir -U pip wheel \
42+
&& pip3 install --no-cache-dir -r /app/requirements.txt \
43+
&& pip3 uninstall -y pip wheel
4344

4445
# =======
4546
# Cleanup
4647
# =======
4748

48-
RUN apk del build-deps \
49+
RUN apk del .build-deps \
4950
&& rm -rf /var/cache/apk/*
5051

5152
# =======

docker-jans-fido2/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
FROM bellsoft/liberica-openjre-alpine:11.0.14
1+
FROM bellsoft/liberica-openjre-alpine:11.0.15
22

33
# ===============
44
# Alpine packages
55
# ===============
66

77
RUN apk update \
88
&& apk upgrade \
9-
&& apk add --no-cache openssl py3-pip tini curl py3-cryptography py3-psycopg2 \
10-
&& apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/community py3-grpcio \
11-
&& apk add --no-cache --virtual build-deps wget git zip \
9+
&& apk add --no-cache openssl python3 tini curl py3-cryptography py3-psycopg2 py3-grpcio \
10+
&& apk add --no-cache --virtual .build-deps wget git zip \
1211
&& mkdir -p /usr/java/latest \
1312
&& ln -sf /usr/lib/jvm/jre /usr/java/latest/jre
1413

@@ -36,7 +35,7 @@ EXPOSE 8080
3635
# =====
3736

3837
ENV CN_VERSION=1.0.0-SNAPSHOT
39-
ENV CN_BUILD_DATE='2022-04-05 11:33'
38+
ENV CN_BUILD_DATE='2022-04-21 08:13'
4039
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-fido2-server/${CN_VERSION}/jans-fido2-server-${CN_VERSION}.war
4140

4241
# Install FIDO2
@@ -88,14 +87,16 @@ RUN wget -q https://www.apple.com/certificateauthority/Apple_WebAuthn_Root_CA.pe
8887
# ======
8988

9089
COPY requirements.txt /app/requirements.txt
91-
RUN pip3 install -U pip wheel \
92-
&& pip3 install --no-cache-dir -r /app/requirements.txt
90+
RUN python3 -m ensurepip \
91+
&& pip3 install --no-cache-dir -U pip wheel \
92+
&& pip3 install --no-cache-dir -r /app/requirements.txt \
93+
&& pip3 uninstall -y pip wheel
9394

9495
# =======
9596
# Cleanup
9697
# =======
9798

98-
RUN apk del build-deps \
99+
RUN apk del .build-deps \
99100
&& rm -rf /var/cache/apk/*
100101

101102
# =======

docker-jans-persistence-loader/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ FROM alpine:3.15.4
66

77
RUN apk update \
88
&& apk upgrade \
9-
&& apk add --no-cache py3-pip curl tini py3-cryptography py3-psycopg2 py3-grpcio \
9+
&& apk add --no-cache python3 curl tini py3-cryptography py3-psycopg2 py3-grpcio \
1010
&& apk add --no-cache --virtual .build-deps git wget
1111

1212
# ======
1313
# Python
1414
# ======
1515

1616
COPY requirements.txt /app/requirements.txt
17-
RUN pip3 install --no-cache-dir -U pip wheel \
18-
&& pip3 install --no-cache-dir --default-timeout=300 -r /app/requirements.txt
17+
RUN python3 -m ensurepip \
18+
&& pip3 install --no-cache-dir -U pip wheel \
19+
&& pip3 install --no-cache-dir --default-timeout=300 -r /app/requirements.txt \
20+
&& pip3 uninstall -y pip wheel
1921

2022
# =====================
2123
# jans-linux-setup sync

docker-jans-scim/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
FROM bellsoft/liberica-openjre-alpine:11.0.13-8
1+
FROM bellsoft/liberica-openjre-alpine:11.0.15
22

33
# ===============
44
# Alpine packages
55
# ===============
66

77
RUN apk update \
88
&& apk upgrade \
9-
&& apk add --no-cache openssl py3-pip tini curl bash py3-cryptography py3-psycopg2 \
10-
&& apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/community py3-grpcio \
11-
&& apk add --no-cache --virtual build-deps wget git zip \
9+
&& apk add --no-cache openssl python3 tini curl bash py3-cryptography py3-psycopg2 py3-grpcio \
10+
&& apk add --no-cache --virtual .build-deps wget git zip \
1211
&& mkdir -p /usr/java/latest \
1312
&& ln -sf /usr/lib/jvm/jre /usr/java/latest/jre
1413

@@ -46,7 +45,7 @@ RUN wget -q https://ox.gluu.org/maven/org/gluufederation/jython-installer/${JYTH
4645
# ====
4746

4847
ENV CN_VERSION=1.0.0-SNAPSHOT
49-
ENV CN_BUILD_DATE='2022-03-23 09:01'
48+
ENV CN_BUILD_DATE='2022-04-21 10:29'
5049
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-scim-server/${CN_VERSION}/jans-scim-server-${CN_VERSION}.war
5150

5251
# Install SCIM
@@ -65,14 +64,16 @@ RUN mkdir -p ${JETTY_BASE}/jans-scim/webapps \
6564
# ======
6665

6766
COPY requirements.txt /app/requirements.txt
68-
RUN pip3 install -U pip wheel \
69-
&& pip3 install --no-cache-dir -r /app/requirements.txt
67+
RUN python3 -m ensurepip \
68+
&& pip3 install --no-cache-dir -U pip wheel \
69+
&& pip3 install --no-cache-dir -r /app/requirements.txt \
70+
&& pip3 uninstall -y pip wheel
7071

7172
# =======
7273
# Cleanup
7374
# =======
7475

75-
RUN apk del build-deps \
76+
RUN apk del .build-deps \
7677
&& rm -rf /var/cache/apk/*
7778

7879
# =======

0 commit comments

Comments
 (0)