Skip to content

Commit

Permalink
Use rust image to add rcodesign instead of rustup
Browse files Browse the repository at this point in the history
Signed-off-by: Alper Polat <[email protected]>
  • Loading branch information
gitperr committed Feb 5, 2024
1 parent 3131be2 commit ae4285a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 6 additions & 1 deletion 1.20/main/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
FROM rust:latest as rustbuilder

RUN cargo install --git https://github.com/indygreg/apple-platform-rs --branch main --bin rcodesign apple-codesign

FROM quay.io/prometheus/golang-builder:1.20-base
MAINTAINER The Prometheus Authors <[email protected]>

Expand Down Expand Up @@ -26,8 +30,9 @@ RUN \
libc6-riscv64-cross linux-libc-dev-riscv64-cross \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /tmp/osxcross \
&& curl https://sh.rustup.rs -sSf | sh -s -- -y
&& mkdir -p /root/.cargo

COPY --from=rustbuilder /root/.cargo/bin /root/.cargo/bin

ARG PROM_OSX_SDK_URL
ENV OSXCROSS_PATH=/usr/osxcross \
Expand Down
11 changes: 7 additions & 4 deletions 1.21/main/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
FROM rust:latest as rustbuilder

RUN cargo install --git https://github.com/indygreg/apple-platform-rs --branch main --bin rcodesign apple-codesign

FROM quay.io/prometheus/golang-builder:1.21-base
MAINTAINER The Prometheus Authors <[email protected]>

Expand Down Expand Up @@ -26,8 +30,9 @@ RUN \
libc6-riscv64-cross linux-libc-dev-riscv64-cross \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /tmp/osxcross \
# Install rust separately, because debian bookworm does not ship newer than 1.63.0
&& curl https://sh.rustup.rs -sSf | sh -s -- -y
&& mkdir -p /root/.cargo

COPY --from=rustbuilder /root/.cargo/bin /root/.cargo/bin

ARG PROM_OSX_SDK_URL
ENV OSXCROSS_PATH=/usr/osxcross \
Expand All @@ -49,6 +54,4 @@ WORKDIR /app

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 /

0 comments on commit ae4285a

Please sign in to comment.