Skip to content

Commit

Permalink
fix: cache conflict of /target between alpine versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Aug 23, 2024
1 parent e010d64 commit 74dd270
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ WORKDIR /platform
RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \
--mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \
--mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \
--mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \
--mount=type=cache,sharing=shared,id=target_${TARGETARCH}_alpine${ALPINE_VERSION},target=/platform/target \
export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \
source $HOME/.cargo/env && \
if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \
Expand Down Expand Up @@ -195,7 +195,7 @@ RUN mkdir /artifacts
RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \
--mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \
--mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \
--mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \
--mount=type=cache,sharing=shared,id=target_${TARGETARCH}_alpine${ALPINE_VERSION},target=/platform/target \
source $HOME/.cargo/env && \
export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \
if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \
Expand Down

0 comments on commit 74dd270

Please sign in to comment.