mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Use non-slim variants to remove needing to apt additional packages
Prevents needing to rebuild all the time via allowing cache hits.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM rust:1.71-slim as builder
|
||||
FROM rust:1.71 as builder
|
||||
LABEL description="STAGE 1: Build"
|
||||
|
||||
# Add files for build
|
||||
@@ -16,9 +16,6 @@ ADD AGPL-3.0 /serai
|
||||
|
||||
WORKDIR /serai
|
||||
|
||||
# Add necessary packages
|
||||
RUN apt update && apt upgrade -y && apt install -y pkg-config clang libssl-dev
|
||||
|
||||
# Mount the caches and build
|
||||
RUN --mount=type=cache,target=/root/.cargo/ \
|
||||
--mount=type=cache,target=/serai/target \
|
||||
@@ -33,9 +30,6 @@ LABEL description="STAGE 2: Copy and Run"
|
||||
|
||||
WORKDIR /home/serai
|
||||
|
||||
# Update for security purposes
|
||||
RUN apt update && apt upgrade -y
|
||||
|
||||
# Copy the Message Queue binary and relevant license
|
||||
COPY --from=builder /serai/bin/* /bin/
|
||||
COPY --from=builder /serai/AGPL-3.0 .
|
||||
|
||||
Reference in New Issue
Block a user