mirror of
https://github.com/certbot/certbot.git
synced 2026-06-09 00:32:12 -04:00
Configure a simple http server to serve the pre compiled wheels
This commit is contained in:
parent
f20b883a71
commit
df0ccd200d
8 changed files with 12 additions and 7 deletions
|
|
@ -26,11 +26,15 @@ source "${DIR}/common.sh"
|
|||
RegisterQemuHandlers
|
||||
ResolveArch "${SNAP_ARCH}"
|
||||
|
||||
docker run --net=host -d --rm -v "${DIR}/packages:/data/packages" --name pypiserver pypiserver/pypiserver
|
||||
tools/strip_hashes.py letsencrypt-auto-source/pieces/dependency-requirements.txt > snap-constraints.txt
|
||||
|
||||
pushd "${DIR}/packages"
|
||||
"${CERTBOT_DIR}/tools/simple_http_server.py" 8080 >/dev/null 2>&1 &
|
||||
HTTP_SERVER_PID="$!"
|
||||
popd
|
||||
|
||||
function cleanup() {
|
||||
docker rm --force pypiserver
|
||||
kill "${HTTP_SERVER_PID}"
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
|
@ -40,7 +44,7 @@ docker run \
|
|||
--net=host \
|
||||
-v "${CERTBOT_DIR}:/certbot" \
|
||||
-w "/certbot" \
|
||||
-e "PIP_EXTRA_INDEX_URL=http://localhost:8080/simple" \
|
||||
-e "PIP_EXTRA_INDEX_URL=http://localhost:8080" \
|
||||
"adferrand/snapcraft:${DOCKER_ARCH}-stable" \
|
||||
snapcraft
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,10 @@ for SNAP_ARCH in ${TARGET_ARCHS}; do
|
|||
&& python3 -m venv /build/venv \
|
||||
&& /build/venv/bin/pip install wheel \
|
||||
&& /build/venv/bin/pip wheel cryptography cffi -c snap-constraints.txt -w /build \
|
||||
&& mkdir -p /workspace/packages \
|
||||
&& mv /build/cryptography* /build/cffi* /workspace/packages \
|
||||
&& chmod 775 /workspace/packages \
|
||||
&& chmod 664 /workspace/packages/*
|
||||
&& mkdir -p /workspace/packages/cffi /workspace/packages/cryptography \
|
||||
&& mv /build/cryptography-* /workspace/packages/cryptography \
|
||||
&& mv /build/cffi-* /workspace/packages/cffi \
|
||||
&& chmod 775 /workspace/packages /workspace/packages/cffi /workspace/packages/cryptography \
|
||||
&& chmod 664 /workspace/packages/cffi/* /workspace/packages/cryptography/*
|
||||
"
|
||||
done
|
||||
|
|
|
|||
Loading…
Reference in a new issue