Cope with rebuild of the squid image when building build images

This commit is contained in:
Tony Garnock-Jones 2022-01-06 13:10:58 +01:00
parent f728afdb61
commit cd4f379e0e
3 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,9 @@ FROM --platform=linux/${DOCKER_ARCH} alpine:latest
#
ARG http_proxy_hostname
COPY ./squid/mitm-myself.sh /root
# This step is just to force rerun of the mitm config when the key changes,
# e.g. when the squid image is rebuilt.
COPY ./squid/squid-ca.pem /tmp
RUN /root/mitm-myself.sh ${http_proxy_hostname}
ARG http_proxy

1
packaging/squid/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
squid-ca.pem

View File

@ -1,5 +1,7 @@
#!/bin/sh
docker buildx build -t synit-squid "$(dirname "$0")"
docker run --rm --name fetch-squid-cert synit-squid cat /etc/ssl/certs/squid-ca.pem \
> squid-ca.pem
docker run -it --rm \
-p 3127:3127 \
-p 3128:3128 \