From 208926e0c4f2fbf6f9efed855cb879efb7c24266 Mon Sep 17 00:00:00 2001 From: Lakshan Perera Date: Tue, 31 Jan 2023 15:05:44 +0700 Subject: [PATCH] fix: include target platform arg --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index db80aa14..117f6d91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ # syntax=docker/dockerfile:1.4 FROM rust:1.67.0-bullseye as builder +ARG TARGETPLATFORM WORKDIR /usr/src/edge-runtime -RUN --mount=type=cache,target=/usr/local/cargo/registry \ +RUN --mount=type=cache,target=/usr/local/cargo/registry,id=${TARGETPLATFORM} \ cargo install cargo-strip COPY . . -RUN --mount=type=cache,target=/usr/local/cargo/registry --mount=type=cache,target=/usr/target \ +RUN --mount=type=cache,target=/usr/local/cargo/registry,id=${TARGETPLATFORM} --mount=type=cache,target=/usr/target,id=${TARGETPLATFORM} \ cargo build --release --target-dir /usr/target && \ cargo strip