fix: reuse local imgproxy image during release
This commit is contained in:
@@ -16,7 +16,9 @@ if [[ "$DRY_RUN" == 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
command -v docker >/dev/null || { echo 'docker is required to build the imgproxy runtime image' >&2; exit 1; }
|
command -v docker >/dev/null || { echo 'docker is required to build the imgproxy runtime image' >&2; exit 1; }
|
||||||
docker pull --platform linux/arm64 "$IMAGE_REF"
|
if ! docker image inspect "$IMAGE_REF" >/dev/null 2>&1; then
|
||||||
|
docker pull --platform linux/arm64 "$IMAGE_REF"
|
||||||
|
fi
|
||||||
docker tag "$IMAGE_REF" "$IMAGE_TAG"
|
docker tag "$IMAGE_REF" "$IMAGE_TAG"
|
||||||
docker save "$IMAGE_TAG" | gzip -c > "$OUT_DIR/imgproxy-runtime-image.tar.gz"
|
docker save "$IMAGE_TAG" | gzip -c > "$OUT_DIR/imgproxy-runtime-image.tar.gz"
|
||||||
shasum -a 256 "$OUT_DIR/imgproxy-runtime-image.tar.gz" > "$OUT_DIR/imgproxy-runtime-image.tar.gz.sha256"
|
shasum -a 256 "$OUT_DIR/imgproxy-runtime-image.tar.gz" > "$OUT_DIR/imgproxy-runtime-image.tar.gz.sha256"
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ test('imgproxy runtime pins an arm64 image digest', () => {
|
|||||||
assert.match(dockerfile, /FROM darthsim\/imgproxy@sha256:[a-f0-9]{64}/);
|
assert.match(dockerfile, /FROM darthsim\/imgproxy@sha256:[a-f0-9]{64}/);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('builder reuses an already verified digest without a network pull', () => {
|
||||||
|
const builder = read('scripts/build-imgproxy-runtime-image.sh');
|
||||||
|
assert.match(builder, /docker image inspect "\$IMAGE_REF"/);
|
||||||
|
});
|
||||||
|
|
||||||
test('installer uses a read-only storage mount and both required ports', () => {
|
test('installer uses a read-only storage mount and both required ports', () => {
|
||||||
const installer = read('scripts/install-imgproxy-runtime-prod.sh');
|
const installer = read('scripts/install-imgproxy-runtime-prod.sh');
|
||||||
assert.match(installer, /-p 127\.0\.0\.1:20082:8080/);
|
assert.match(installer, /-p 127\.0\.0\.1:20082:8080/);
|
||||||
|
|||||||
Reference in New Issue
Block a user