From 4a050718c1af5adf96353cb75e39d2291f472cb1 Mon Sep 17 00:00:00 2001 From: Kohei Tokunaga Date: Tue, 15 Jul 2025 20:30:52 +0900 Subject: [PATCH 1/3] docs: add docs about how to use with Transfer Service Signed-off-by: Kohei Tokunaga --- docs/transfer.md | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 docs/transfer.md diff --git a/docs/transfer.md b/docs/transfer.md new file mode 100644 index 000000000..549280b01 --- /dev/null +++ b/docs/transfer.md @@ -0,0 +1,99 @@ +# Enabling Stargz Snapshotter With Transfer Service + +Transfer Service is a containerd component which is used for image management in contianerd (e.g. pulling and pushing images). +For details about Transfer Service, refer to [the official document in the containerd repo](https://github.com/containerd/containerd/blob/6af7c07905a317d4c343a49255e2392f4c8569f9/docs/transfer.md). + +To use Stargz Snapshotter on containerd with enabling Transfer Service, additional configurations is needed. + +## Availability of Transfer Service + +Transfer Service is available since v1.7. +And this is enabled in different settings depending on the containerd version. + +|containerd version|`ctr`|CRI| +---|---|--- +|containerd >= v1.7 and < v2.0|Disabled by default. Enabled by `--local=false`|Disabled| +|containerd >= v2.0 and < v2.1|Enabled by default. Disabled by `--local`|Disabled| +|containerd >= v2.1|Enabled by default. Disabled by `--local`|Enabled by default. Disabled when conditions described in [containerd's CRI document](https://github.com/containerd/containerd/blob/v2.1.0/docs/cri/config.md#image-pull-configuration-since-containerd-v21) are met| + +### Note about containerd v2.1 + +Before containerd v2.1, `disable_snapshot_annotations = false` in containerd's config TOML was a mandatory field to enable Stargz Snapshotter in CRI. +In containerd v2.1, `disable_snapshot_annotations = false` field can still be used to enable Stargz Snapshotter and containerd disables Transfer Service when this field is detected. +If you want to enable Transfer Service, you need to remove `disable_snapshot_annotations = false` field and apply the configuration explaind in this document. + +## How to enable Stargz Snapshotter when Transfer Service is enabled? + +In containerd v2.1, Transfer Service added support for remote snapshotters like Stargz Snapshotter. + +### For ctr and other non-CRI clients + +To enable Stargz Snapshotter with Transfer Service, you need to start containerd-stargz-grpc on the node and add the following configuration to contianerd's config TOML file. +Note that you need to add a field `enable_remote_snapshot_annotations = "true"` in `proxy_plugins.stargz.exports` so that containerd can correctly pass image-related information to Stargz Snapshotter. + +```toml +version = 2 + +# Enable Stargz Snapshotter in Transfer Service +[[plugins."io.containerd.transfer.v1.local".unpack_config]] + platform = "linux" + snapshotter = "stargz" + +# Plugin Stargz Snapshotter +[proxy_plugins] + [proxy_plugins.stargz] + type = "snapshot" + address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" + enable_remote_snapshot_annotations = "true" +``` + +#### Example client command + +When you enable Transfer Service with Stargz Snapshotter, you can perform lazy pulling using the normal `ctr` command. (of course, `ctr-remote` can still be used) + +``` +# ctr image pull --snapshotter=stargz ghcr.io/stargz-containers/ubuntu:24.04-esgz +``` + +Then `mount | grep stargz` prints stargz mounts on the node. + +### For CRI + +To enable Stargz Snapshotter with Transfer Service, you need to start containerd-stargz-grpc on the node and add the following configuration to contianerd's config TOML file. + +```toml +version = 2 + +# Basic CRI configuration with enabling Stargz Snapshotter +[plugins."io.containerd.grpc.v1.cri".containerd] + default_runtime_name = "runc" + snapshotter = "stargz" +[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc] + runtime_type = "io.containerd.runc.v2" + +# Enable Stargz Snapshotter in Transfer Service +[[plugins."io.containerd.transfer.v1.local".unpack_config]] + platform = "linux" + snapshotter = "stargz" + +# Plugin Stargz Snapshotter +[proxy_plugins] + [proxy_plugins.stargz] + type = "snapshot" + address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" + enable_remote_snapshot_annotations = "true" +``` + +#### Example client command + +You can quickly check the behaviour using `crictl` command. + +``` +# crictl image pull ghcr.io/stargz-containers/ubuntu:24.04-esgz +``` + +Then `mount | grep stargz` prints stargz mounts on the node. From 51d84f265664124dd65deb38c66e5dd77de6ef70 Mon Sep 17 00:00:00 2001 From: Kohei Tokunaga Date: Tue, 15 Jul 2025 20:35:27 +0900 Subject: [PATCH 2/3] Dockerfile: update pause image to the version used in critest Signed-off-by: Kohei Tokunaga --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9a5b2c051..e0b11805e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ ARG NETAVARK_VERSION=v1.13.0 ARG CONTAINERIZED_SYSTEMD_VERSION=v0.1.1 ARG SLIRP4NETNS_VERSION=v1.3.1 -ARG PAUSE_IMAGE_NAME_TEST=registry.k8s.io/pause:3.10 +ARG PAUSE_IMAGE_NAME_TEST=registry.k8s.io/pause:3.10.1 # Used in CI ARG CRI_TOOLS_VERSION=v1.30.1 From b405072cb117c3ba87e7bd6e85c1a21dbd3170f9 Mon Sep 17 00:00:00 2001 From: Kohei Tokunaga Date: Tue, 15 Jul 2025 20:35:41 +0900 Subject: [PATCH 3/3] test: Add test for Transfer Service Signed-off-by: Kohei Tokunaga --- .github/workflows/tests.yml | 20 +++++++++ .../config.containerd.transfer.toml | 26 +++++++++++ script/cri-containerd/test-stargz.sh | 11 +++-- script/cri-containerd/test.sh | 12 ++++-- .../containerd/config.containerd.toml | 10 +++++ script/integration/containerd/entrypoint.sh | 43 +++++++++++-------- script/integration/test.sh | 7 ++- 7 files changed, 104 insertions(+), 25 deletions(-) create mode 100644 script/cri-containerd/config.containerd.transfer.toml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 915bb20ef..bcfc09282 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,6 +56,7 @@ jobs: builtin: ["true", "false"] metadata-store: ["memory", "db"] fuse-passthrough: ["true", "false"] + transfer-service: ["true", "false"] exclude: - buildargs: "" builtin: "true" @@ -69,6 +70,14 @@ jobs: buildargs: "--build-arg=CONTAINERD_VERSION=main" - fuse-passthrough: "true" metadata-store: "db" + - transfer-service: "true" + buildargs: "--build-arg=CONTAINERD_VERSION=main" + - transfer-service: "true" + builtin: "true" + - transfer-service: "true" + metadata-store: "db" + - transfer-service: "true" + fuse-passthrough: "true" steps: - name: Install htpasswd for setting up private registry run: sudo apt-get update -y && sudo apt-get --no-install-recommends install -y apache2-utils @@ -79,6 +88,7 @@ jobs: BUILTIN_SNAPSHOTTER: ${{ matrix.builtin }} METADATA_STORE: ${{ matrix.metadata-store }} FUSE_PASSTHROUGH: ${{ matrix.fuse-passthrough }} + TRANSFER_SERVICE: ${{ matrix.transfer-service }} run: make integration test-optimize: @@ -149,6 +159,7 @@ jobs: builtin: ["true", "false"] metadata-store: ["memory", "db"] fuse-passthrough: ["true", "false"] + transfer-service: ["true", "false"] exclude: - buildargs: "" builtin: "true" @@ -162,6 +173,14 @@ jobs: buildargs: "--build-arg=CONTAINERD_VERSION=main" - fuse-passthrough: "true" metadata-store: "db" + - transfer-service: "true" + buildargs: "--build-arg=CONTAINERD_VERSION=main" + - transfer-service: "true" + builtin: "true" + - transfer-service: "true" + metadata-store: "db" + - transfer-service: "true" + fuse-passthrough: "true" steps: - uses: actions/checkout@v4 - name: Validate containerd through CRI @@ -170,6 +189,7 @@ jobs: BUILTIN_SNAPSHOTTER: ${{ matrix.builtin }} METADATA_STORE: ${{ matrix.metadata-store }} FUSE_PASSTHROUGH: ${{ matrix.fuse-passthrough }} + TRANSFER_SERVICE: ${{ matrix.transfer-service }} run: make test-cri-containerd test-cri-cri-o: diff --git a/script/cri-containerd/config.containerd.transfer.toml b/script/cri-containerd/config.containerd.transfer.toml new file mode 100644 index 000000000..18374720a --- /dev/null +++ b/script/cri-containerd/config.containerd.transfer.toml @@ -0,0 +1,26 @@ +version = 2 + +# Basic CRI configuration with enabling Stargz Snapshotter +[plugins."io.containerd.grpc.v1.cri".containerd] + default_runtime_name = "runc" + snapshotter = "stargz" +[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc] + runtime_type = "io.containerd.runc.v2" + +# Enable Stargz Snapshotter in Transfer Service +[[plugins."io.containerd.transfer.v1.local".unpack_config]] + platform = "linux" + snapshotter = "stargz" +# Enable overlayfs in Transfer Service +[[plugins."io.containerd.transfer.v1.local".unpack_config]] + platform = "linux" + snapshotter = "overlayfs" + +# Plugin Stargz Snapshotter +[proxy_plugins] + [proxy_plugins.stargz] + type = "snapshot" + address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" + enable_remote_snapshot_annotations = "true" diff --git a/script/cri-containerd/test-stargz.sh b/script/cri-containerd/test-stargz.sh index 29dc80d1e..5c5141356 100755 --- a/script/cri-containerd/test-stargz.sh +++ b/script/cri-containerd/test-stargz.sh @@ -115,11 +115,16 @@ docker exec "${PREPARE_NODE_NAME}" /bin/bash /tools/mirror.sh # Configure mirror registries for containerd and snapshotter docker exec "${TEST_NODE_NAME}" cat /etc/containerd/config.toml > "${CONTAINERD_CONFIG}" docker exec "${TEST_NODE_NAME}" cat /etc/containerd-stargz-grpc/config.toml > "${SNAPSHOTTER_CONFIG}" +docker exec "${TEST_NODE_NAME}" mkdir -p "/etc/containerd/certs.d" +cat <> "${CONTAINERD_CONFIG}" +[plugins."io.containerd.cri.v1.images".registry] + config_path = "/etc/containerd/certs.d" +EOF cat "${IMAGE_LIST}" | sed -E 's/^([^/]*).*/\1/g' | sort | uniq | while read DOMAIN ; do echo "Adding mirror config: ${DOMAIN}" - cat <> "${CONTAINERD_CONFIG}" -[plugins."io.containerd.grpc.v1.cri".registry.mirrors."${DOMAIN}"] -endpoint = ["http://${REGISTRY_HOST}:5000"] + docker exec "${TEST_NODE_NAME}" mkdir -p "/etc/containerd/certs.d/${DOMAIN}/" + cat <> "${CONTAINERD_CONFIG}" diff --git a/script/cri-containerd/test.sh b/script/cri-containerd/test.sh index 76c1b0ff0..9c738f59f 100755 --- a/script/cri-containerd/test.sh +++ b/script/cri-containerd/test.sh @@ -50,7 +50,7 @@ function cleanup { } trap 'cleanup "$?"' EXIT SIGHUP SIGINT SIGQUIT SIGTERM -BUILTIN_HACK_INST= +ADDITIONAL_INST= if [ "${BUILTIN_SNAPSHOTTER:-}" == "true" ] ; then # Special configuration for CRI containerd + builtin stargz snapshotter cat < "${TMP_CONTEXT}/containerd.hack.toml" @@ -75,7 +75,7 @@ metadata_store = "memory" [plugins."io.containerd.snapshotter.v1.stargz".cri_keychain] enable_keychain = true EOF - BUILTIN_HACK_INST="COPY containerd.hack.toml /etc/containerd/config.toml" + ADDITIONAL_INST="COPY containerd.hack.toml /etc/containerd/config.toml" fi cat < "${TMP_CONTEXT}/test.conflist" @@ -128,6 +128,12 @@ if [ "${FUSE_PASSTHROUGH:-}" != "" ] ; then fi fi +if [ "${TRANSFER_SERVICE:-}" == "true" ] ; then + cp "${CONTEXT}/config.containerd.transfer.toml" "${TMP_CONTEXT}/" + ADDITIONAL_INST="${ADDITIONAL_INST} +COPY config.containerd.transfer.toml /etc/containerd/config.toml" +fi + # Prepare the testing node cat < "${TMP_CONTEXT}/Dockerfile" # Legacy builder that doesn't support TARGETARCH should set this explicitly using --build-arg. @@ -152,7 +158,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends make && \ COPY ./test.conflist /etc/cni/net.d/test.conflist -${BUILTIN_HACK_INST} +${ADDITIONAL_INST} RUN if [ "${BUILTIN_SNAPSHOTTER:-}" != "true" ] ; then \ sed -i '1imetadata_store = "${USE_METADATA_STORE}"' "${SNAPSHOTTER_CONFIG_FILE}" && \ diff --git a/script/integration/containerd/config.containerd.toml b/script/integration/containerd/config.containerd.toml index f9bfecf59..0837fe655 100644 --- a/script/integration/containerd/config.containerd.toml +++ b/script/integration/containerd/config.containerd.toml @@ -10,3 +10,13 @@ check_always = true [plugins."io.containerd.snapshotter.v1.stargz".registry.mirrors."registry-integration.test"] endpoint = ["http://registry-alt.test:5000"] + +# Enable Stargz Snapshotter in Transfer Service +[[plugins."io.containerd.transfer.v1.local".unpack_config]] + platform = "linux" + snapshotter = "stargz" + +# Enable overlayfs in Transfer Service +[[plugins."io.containerd.transfer.v1.local".unpack_config]] + platform = "linux" + snapshotter = "overlayfs" diff --git a/script/integration/containerd/entrypoint.sh b/script/integration/containerd/entrypoint.sh index 9c0f4afbf..643d0cffe 100755 --- a/script/integration/containerd/entrypoint.sh +++ b/script/integration/containerd/entrypoint.sh @@ -146,13 +146,13 @@ function optimize { local DST="${2}" local PLAINHTTP="${3}" local OPTS=${@:4} - ctr-remote image pull --local -u "${DUMMYUSER}:${DUMMYPASS}" "${SRC}" + ctr-remote image pull -u "${DUMMYUSER}:${DUMMYPASS}" "${SRC}" ctr-remote image optimize ${OPTS} --oci "${SRC}" "${DST}" PUSHOPTS= if [ "${PLAINHTTP}" == "true" ] ; then PUSHOPTS=--plain-http fi - ctr-remote image push --local ${PUSHOPTS} -u "${DUMMYUSER}:${DUMMYPASS}" "${DST}" + ctr-remote image push ${PUSHOPTS} -u "${DUMMYUSER}:${DUMMYPASS}" "${DST}" } function convert { @@ -164,17 +164,17 @@ function convert { if [ "${PLAINHTTP}" == "true" ] ; then PUSHOPTS=--plain-http fi - ctr-remote image pull --local -u "${DUMMYUSER}:${DUMMYPASS}" "${SRC}" + ctr-remote image pull -u "${DUMMYUSER}:${DUMMYPASS}" "${SRC}" ctr-remote image convert ${OPTS} --oci "${SRC}" "${DST}" - ctr-remote image push --local ${PUSHOPTS} -u "${DUMMYUSER}:${DUMMYPASS}" "${DST}" + ctr-remote image push ${PUSHOPTS} -u "${DUMMYUSER}:${DUMMYPASS}" "${DST}" } function copy { local SRC="${1}" local DST="${2}" - ctr-remote image pull --local --all-platforms "${SRC}" - ctr-remote image tag --local "${SRC}" "${DST}" - ctr-remote image push --local -u "${DUMMYUSER}:${DUMMYPASS}" "${DST}" + ctr-remote image pull --all-platforms "${SRC}" + ctr-remote image tag "${SRC}" "${DST}" + ctr-remote image push -u "${DUMMYUSER}:${DUMMYPASS}" "${DST}" } function copy_out_dir { @@ -192,6 +192,11 @@ function copy_out_dir { rm "${TMPFILE}" } +RPULL_COMMAND="rpull" +if [ "${USE_TRANSFER_SERVICE}" == "true" ] ; then + RPULL_COMMAND="pull --snapshotter=stargz" +fi + function dump_dir { local IMAGE="${1}" local TARGETDIR="${2}" @@ -201,9 +206,9 @@ function dump_dir { reboot_containerd if [ "${REMOTE}" == "true" ] ; then - run_and_check_remote_snapshots ctr-remote images rpull --user "${DUMMYUSER}:${DUMMYPASS}" "${IMAGE}" + run_and_check_remote_snapshots ctr-remote images ${RPULL_COMMAND} --user "${DUMMYUSER}:${DUMMYPASS}" "${IMAGE}" else - ctr-remote image pull --local --snapshotter="${SNAPSHOTTER}" --user "${DUMMYUSER}:${DUMMYPASS}" "${IMAGE}" + ctr-remote image pull --snapshotter="${SNAPSHOTTER}" --user "${DUMMYUSER}:${DUMMYPASS}" "${IMAGE}" fi copy_out_dir "${IMAGE}" "${TARGETDIR}" "${DEST}" "${SNAPSHOTTER}" } @@ -244,6 +249,8 @@ if [ "${BUILTIN_SNAPSHOTTER}" != "true" ] ; then [proxy_plugins.stargz] type = "snapshot" address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + enable_remote_snapshot_annotations = "true" EOF fi @@ -277,9 +284,9 @@ optimize "${REGISTRY_HOST}/alpine:3.15.3" "${REGISTRY_ALT_HOST}:5000/alpine:esgz # TODO: support external TOC suffix other than "-esgztoc" optimize "${REGISTRY_HOST}/ubuntu:22.04" "${REGISTRY_HOST}/ubuntu:esgz-50000" "false" --estargz-min-chunk-size=50000 optimize "${REGISTRY_HOST}/ubuntu:22.04" "${REGISTRY_HOST}/ubuntu:esgz-ex" "false" --estargz-external-toc -ctr-remote image push --local -u "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/ubuntu:esgz-ex-esgztoc" +ctr-remote image push -u "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/ubuntu:esgz-ex-esgztoc" convert "${REGISTRY_HOST}/ubuntu:22.04" "${REGISTRY_HOST}/ubuntu:esgz-ex-keep-diff-id" "false" --estargz --estargz-external-toc --estargz-keep-diff-id -ctr-remote image push --local -u "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/ubuntu:esgz-ex-keep-diff-id-esgztoc" +ctr-remote image push -u "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/ubuntu:esgz-ex-keep-diff-id-esgztoc" if [ "${BUILTIN_SNAPSHOTTER}" != "true" ] ; then @@ -295,21 +302,21 @@ if [ "${BUILTIN_SNAPSHOTTER}" != "true" ] ; then retry curl -X POST localhost:5001/api/v0/version >/dev/null 2>&1 # wait for up # stargz snapshotter (default labels) - ctr-remote image pull --local --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/ubuntu:22.04" + ctr-remote image pull --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/ubuntu:22.04" CID=$(ctr-remote i ipfs-push "${REGISTRY_HOST}/ubuntu:22.04") reboot_containerd run_and_check_remote_snapshots ctr-remote i rpull --ipfs "${CID}" copy_out_dir "${CID}" "/usr" "${USR_STARGZSN_IPFS}" "stargz" # stargz snapshotter (containerd labels) - ctr-remote image pull --local --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/ubuntu:22.04" + ctr-remote image pull --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/ubuntu:22.04" CID=$(ctr-remote i ipfs-push "${REGISTRY_HOST}/ubuntu:22.04") reboot_containerd run_and_check_remote_snapshots ctr-remote i rpull --use-containerd-labels --ipfs "${CID}" copy_out_dir "${CID}" "/usr" "${USR_STARGZSN_CTD_IPFS}" "stargz" # overlayfs snapshotter - ctr-remote image pull --local --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/ubuntu:22.04" + ctr-remote image pull --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/ubuntu:22.04" CID=$(ctr-remote i ipfs-push --estargz=false "${REGISTRY_HOST}/ubuntu:22.04") reboot_containerd ctr-remote i rpull --snapshotter=overlayfs --ipfs "${CID}" @@ -330,11 +337,11 @@ echo "Testing refreshing and mirror..." reboot_containerd echo "Getting image with normal snapshotter..." -ctr-remote image pull --local --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/alpine:esgz" +ctr-remote image pull --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/alpine:esgz" copy_out_dir "${REGISTRY_HOST}/alpine:esgz" "/usr" "${USR_ORG}" "overlayfs" echo "Getting image with stargz snapshotter..." -run_and_check_remote_snapshots ctr-remote images rpull --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/alpine:esgz" +run_and_check_remote_snapshots ctr-remote images ${RPULL_COMMAND} --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/alpine:esgz" REGISTRY_HOST_IP=$(getent hosts "${REGISTRY_HOST}" | awk '{ print $1 }') REGISTRY_ALT_HOST_IP=$(getent hosts "${REGISTRY_ALT_HOST}" | awk '{ print $1 }') @@ -474,7 +481,7 @@ diff --no-dereference -qr "${USR_NORMALSN_PLAIN_STARGZ}/" "${USR_STARGZSN_PLAIN_ ############ # Try to pull this image from different namespace. -ctr-remote --namespace=dummy images rpull --user "${DUMMYUSER}:${DUMMYPASS}" \ +ctr-remote --namespace=dummy images ${RPULL_COMMAND} --user "${DUMMYUSER}:${DUMMYPASS}" \ "${REGISTRY_HOST}/ubuntu:esgz" ############ @@ -489,7 +496,7 @@ mv /etc/containerd-stargz-grpc/config.toml_rm /etc/containerd-stargz-grpc/config reboot_containerd if [ "${BUILTIN_SNAPSHOTTER}" != "true" ] ; then # Snapshots should be available even after restarting the snapshotter with a signal - run_and_check_remote_snapshots ctr-remote images rpull --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/alpine:esgz" + run_and_check_remote_snapshots ctr-remote images ${RPULL_COMMAND} --user "${DUMMYUSER}:${DUMMYPASS}" "${REGISTRY_HOST}/alpine:esgz" ctr-remote run --rm --snapshotter=stargz "${REGISTRY_HOST}/alpine:esgz" test echo hi TARGET_SIGNALS=(SIGINT SIGTERM) diff --git a/script/integration/test.sh b/script/integration/test.sh index 6cbf46acd..395cfc4da 100755 --- a/script/integration/test.sh +++ b/script/integration/test.sh @@ -69,6 +69,11 @@ if [ "${FUSE_PASSTHROUGH:-}" != "" ] ; then fi fi +USE_TRANSFER_SERVICE=false +if [ "${TRANSFER_SERVICE:-}" == "true" ] ; then + USE_TRANSFER_SERVICE=true +fi + DOCKER_COMPOSE_YAML=$(mktemp) AUTH_DIR=$(mktemp -d) SS_ROOT_DIR=$(mktemp -d) @@ -107,7 +112,7 @@ RUN if [ "${BUILTIN_SNAPSHOTTER:-}" != "true" ] ; then \ fi ENV CONTAINERD_SNAPSHOTTER="" - +ENV USE_TRANSFER_SERVICE="${USE_TRANSFER_SERVICE}" ENTRYPOINT [ "/entrypoint.sh" ] EOF docker build ${DOCKER_BUILD_ARGS:-} -t "${INTEGRATION_TEST_IMAGE_NAME}" ${DOCKER_BUILD_ARGS:-} "${TMP_CONTEXT}"