File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,9 @@ ARG SWIFT_WEBROOT=https://download.swift.org/development
3535# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options.
3636FROM base AS base-amd64
3737ARG OS_ARCH_SUFFIX=
38- ARG ADDITIONAL_TAR_OPTIONS="--strip-components=1"
3938
4039FROM base AS base-arm64
4140ARG OS_ARCH_SUFFIX=-aarch64
42- ARG ADDITIONAL_TAR_OPTIONS=
4341
4442FROM base-$TARGETARCH AS final
4543
@@ -61,7 +59,7 @@ RUN set -e; \
6159 && curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
6260 && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
6361 # - Unpack the toolchain, set libs permissions, and clean up.
64- && tar -xzf latest_toolchain.tar.gz --directory / ${ADDITIONAL_TAR_OPTIONS} \
62+ && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
6563 && chmod -R o+r /usr/lib/swift \
6664 && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
6765
Original file line number Diff line number Diff line change @@ -37,11 +37,9 @@ ARG SWIFT_WEBROOT=https://download.swift.org/development
3737# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options.
3838FROM base AS base-amd64
3939ARG OS_ARCH_SUFFIX=
40- ARG ADDITIONAL_TAR_OPTIONS="--strip-components=1"
4140
4241FROM base AS base-arm64
4342ARG OS_ARCH_SUFFIX=-aarch64
44- ARG ADDITIONAL_TAR_OPTIONS=
4543
4644FROM base-$TARGETARCH AS final
4745
@@ -66,7 +64,7 @@ RUN set -e; \
6664 && curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
6765 && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
6866 # - Unpack the toolchain, set libs permissions, and clean up.
69- && tar -xzf latest_toolchain.tar.gz --directory / ${ADDITIONAL_TAR_OPTIONS} \
67+ && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
7068 && chmod -R o+r /usr/lib/swift \
7169 && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
7270 && apt-get purge --auto-remove -y curl
You can’t perform that action at this time.
0 commit comments