Skip to content

Commit dc25f3f

Browse files
authored
🚚(docker) use static path for certifi ca certificate
The certifi ca certificate is now stored under a static path (/cert/cacert.pem) to avoid issues when python is upgraded and the path to the certificate changes.
1 parent 529e7f1 commit dc25f3f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ RUN chmod g=u /etc/passwd
9494
# Copy installed python dependencies
9595
COPY --from=back-builder /install /usr/local
9696

97+
# Link certifi certificate from a static path /cert/cacert.pem to avoid issues
98+
# when python is upgraded and the path to the certificate changes.
99+
# The space between print and the ( is intended otherwise the git lint is failing
100+
RUN mkdir /cert && \
101+
path=`python -c 'import certifi;print (certifi.where())'` && \
102+
mv $path /cert/ && \
103+
ln -s /cert/cacert.pem $path
104+
97105
# Copy impress application (see .dockerignore)
98106
COPY ./src/backend /app/
99107

docs/examples/helm/impress.values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ backend:
8282
# Extra volume to manage our local custom CA and avoid to set ssl_verify: false
8383
extraVolumeMounts:
8484
- name: certs
85-
mountPath: /usr/local/lib/python3.13/site-packages/certifi/cacert.pem
85+
mountPath: /cert/cacert.pem
8686
subPath: cacert.pem
8787

8888
# Extra volume to manage our local custom CA and avoid to set ssl_verify: false

src/helm/env.d/dev/values.impress.yaml.gotmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ backend:
114114
# Extra volume mounts to manage our local custom CA and avoid to set ssl_verify: false
115115
extraVolumeMounts:
116116
- name: certs
117-
mountPath: /usr/local/lib/python3.13/site-packages/certifi/cacert.pem
117+
mountPath: /cert/cacert.pem
118118
subPath: cacert.pem
119119

120120
# Extra volumes to manage our local custom CA and avoid to set ssl_verify: false

0 commit comments

Comments
 (0)