From 3131be245cad4763359a2f1626f0bec0d32288a0 Mon Sep 17 00:00:00 2001 From: Alper Polat Date: Sun, 28 Jan 2024 19:34:00 +0200 Subject: [PATCH] Move rust installation further down for better flow Seems like build pipeline fails because we remove the osxcross directory, so might be better to concatenate the path and install rust a bit later. Signed-off-by: Alper Polat --- 1.20/main/Dockerfile | 10 +++++----- 1.21/main/Dockerfile | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/1.20/main/Dockerfile b/1.20/main/Dockerfile index 6bbe1d6..afdc8d0 100644 --- a/1.20/main/Dockerfile +++ b/1.20/main/Dockerfile @@ -34,8 +34,7 @@ ENV OSXCROSS_PATH=/usr/osxcross \ OSXCROSS_REV=ff8d100f3f026b4ffbe4ce96d8aac4ce06f1278b \ SDK_VERSION=14 \ DARWIN_VERSION=23 \ - OSX_VERSION_MIN=10.13 \ - PATH="/root/.cargo/bin:${PATH}" + OSX_VERSION_MIN=10.13 WORKDIR /tmp/osxcross RUN \ @@ -44,11 +43,12 @@ RUN \ && curl -s -f -L "${PROM_OSX_SDK_URL}/MacOSX${SDK_VERSION}.sdk.tar.xz" -o "tarballs/MacOSX${SDK_VERSION}.sdk.tar.xz" \ && UNATTENDED=yes JOBS=2 ./build.sh \ && mv target "${OSXCROSS_PATH}" \ - && rm -rf /tmp/osxcross "/usr/osxcross/SDK/MacOSX${SDK_VERSION}.sdk/usr/share/man" \ - && cargo install --git https://github.com/indygreg/apple-platform-rs --branch main --bin rcodesign apple-codesign + && rm -rf /tmp/osxcross "/usr/osxcross/SDK/MacOSX${SDK_VERSION}.sdk/usr/share/man" WORKDIR /app -ENV PATH $OSXCROSS_PATH/bin:$PATH +ENV PATH /root/.cargo/bin:$OSXCROSS_PATH/bin:$PATH + +RUN cargo install --git https://github.com/indygreg/apple-platform-rs --branch main --bin rcodesign apple-codesign COPY rootfs / diff --git a/1.21/main/Dockerfile b/1.21/main/Dockerfile index 18b92f3..728a75a 100644 --- a/1.21/main/Dockerfile +++ b/1.21/main/Dockerfile @@ -34,8 +34,7 @@ ENV OSXCROSS_PATH=/usr/osxcross \ OSXCROSS_REV=ff8d100f3f026b4ffbe4ce96d8aac4ce06f1278b \ SDK_VERSION=14 \ DARWIN_VERSION=23 \ - OSX_VERSION_MIN=10.13 \ - PATH="/root/.cargo/bin:${PATH}" + OSX_VERSION_MIN=10.13 WORKDIR /tmp/osxcross RUN \ @@ -44,11 +43,12 @@ RUN \ && curl -s -f -L "${PROM_OSX_SDK_URL}/MacOSX${SDK_VERSION}.sdk.tar.xz" -o "tarballs/MacOSX${SDK_VERSION}.sdk.tar.xz" \ && UNATTENDED=yes JOBS=2 ./build.sh \ && mv target "${OSXCROSS_PATH}" \ - && rm -rf /tmp/osxcross "/usr/osxcross/SDK/MacOSX${SDK_VERSION}.sdk/usr/share/man" \ - && cargo install --git https://github.com/indygreg/apple-platform-rs --branch main --bin rcodesign apple-codesign + && rm -rf /tmp/osxcross "/usr/osxcross/SDK/MacOSX${SDK_VERSION}.sdk/usr/share/man" WORKDIR /app -ENV PATH $OSXCROSS_PATH/bin:$PATH +ENV PATH /root/.cargo/bin:$OSXCROSS_PATH/bin:$PATH + +RUN cargo install --git https://github.com/indygreg/apple-platform-rs --branch main --bin rcodesign apple-codesign COPY rootfs /