Skip to content

Commit df02d27

Browse files
nnobelissschuberth
authored andcommitted
fix(docker): Create a directory for the tmpfs mount
Due to recent changes in the docker engine (see [1] and [2]), the tmpfs mount point is not writable anymore for curl. Fix that by creating the mount point in /tmp and adjusting its permissions. [1]: docker/cli#6630 [2]: opencontainers/runc#4971 Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.com>
1 parent cbd0eff commit df02d27

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,9 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
310310

311311
ENV ANDROID_HOME=/opt/android-sdk
312312

313-
RUN --mount=type=tmpfs,target=/android \
314-
cd /android \
313+
RUN mkdir /tmp/android && chmod =1777 /tmp/android
314+
RUN --mount=type=tmpfs,target=/tmp/android \
315+
cd /tmp/android \
315316
&& curl -Os https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_CMD_VERSION}_latest.zip \
316317
&& unzip -q commandlinetools-linux-${ANDROID_CMD_VERSION}_latest.zip -d $ANDROID_HOME \
317318
&& PROXY_HOST_AND_PORT=${https_proxy#*://} \
@@ -341,10 +342,11 @@ ENV PATH=$PATH:$DART_SDK/bin
341342

342343
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
343344

344-
RUN --mount=type=tmpfs,target=/dart \
345+
RUN mkdir /tmp/dart && chmod =1777 /tmp/dart
346+
RUN --mount=type=tmpfs,target=/tmp/dart \
345347
ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/x64/) \
346-
&& curl -o /dart/dart.zip -L https://storage.googleapis.com/dart-archive/channels/stable/release/$DART_VERSION/sdk/dartsdk-linux-$ARCH-release.zip \
347-
&& unzip /dart/dart.zip
348+
&& curl -o /tmp/dart/dart.zip -L https://storage.googleapis.com/dart-archive/channels/stable/release/$DART_VERSION/sdk/dartsdk-linux-$ARCH-release.zip \
349+
&& unzip /tmp/dart/dart.zip
348350

349351
FROM scratch AS dart
350352
COPY --from=dartbuild /opt/dart-sdk /opt/dart-sdk

0 commit comments

Comments
 (0)