mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-17 01:17:36 +00:00
Update Dockerfiles to bookworm, successfully
Removes use of the Parity CI image. Always uses slim variants.
This commit is contained in:
parent
0eb56406a4
commit
39eae2795f
5 changed files with 33 additions and 30 deletions
|
@ -26,12 +26,15 @@ RUN grep bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz SHA256SUMS | sha256s
|
|||
# Prepare Image
|
||||
RUN tar xzvf bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz
|
||||
|
||||
FROM debian:bullseye-slim as image
|
||||
FROM debian:bookworm-slim as image
|
||||
|
||||
WORKDIR /home/bitcoin
|
||||
COPY --from=builder /home/bitcoin/* .
|
||||
RUN mv bin/* /bin && mv lib/* /lib
|
||||
COPY ./scripts /scripts
|
||||
|
||||
# Upgrade packages
|
||||
RUN apt update && apt upgrade -y
|
||||
|
||||
EXPOSE 8332 8333 18332 18333 18443 18444
|
||||
VOLUME ["/home/bitcoin/.bitcoin"]
|
||||
|
|
|
@ -27,12 +27,15 @@ RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --keyserver-options no-self-si
|
|||
RUN tar -xvjf monero-linux-x64-v${MONERO_VERSION}.tar.bz2 --strip-components=1
|
||||
|
||||
# Prepare Image
|
||||
FROM debian:bullseye-slim as image
|
||||
FROM debian:bookworm-slim as image
|
||||
|
||||
WORKDIR /home/monero
|
||||
COPY --from=builder /home/monero/* .
|
||||
RUN mv * /bin/
|
||||
COPY ./scripts /scripts
|
||||
|
||||
# Upgrade packages
|
||||
RUN apt update && apt upgrade -y
|
||||
|
||||
EXPOSE 18080 18081
|
||||
VOLUME /home/monero/.bitmonero
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM rust:1.71 as builder
|
||||
FROM rust:1.71-slim-bookworm as builder
|
||||
LABEL description="STAGE 1: Build"
|
||||
|
||||
# Add files for build
|
||||
|
@ -29,7 +29,7 @@ RUN --mount=type=cache,target=/root/.cargo \
|
|||
mv /serai/target/release/serai-message-queue /serai/bin
|
||||
|
||||
# Prepare Image
|
||||
FROM debian:bullseye-slim as image
|
||||
FROM debian:bookworm-slim as image
|
||||
LABEL description="STAGE 2: Copy and Run"
|
||||
|
||||
WORKDIR /home/serai
|
||||
|
@ -38,6 +38,9 @@ WORKDIR /home/serai
|
|||
COPY --from=builder /serai/bin/* /bin/
|
||||
COPY --from=builder /serai/AGPL-3.0 .
|
||||
|
||||
# Upgrade packages
|
||||
RUN apt update && apt upgrade -y
|
||||
|
||||
# Run message-queue
|
||||
EXPOSE 2287
|
||||
CMD ["serai-message-queue"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM docker.io/paritytech/ci-linux:production as builder
|
||||
FROM rust:1.71-slim-bookworm as builder
|
||||
LABEL description="STAGE 1: Build"
|
||||
|
||||
# Add files for build
|
||||
|
@ -16,6 +16,11 @@ ADD AGPL-3.0 /serai
|
|||
|
||||
WORKDIR /serai
|
||||
|
||||
RUN apt update && apt upgrade -y && apt install -y clang libssl-dev
|
||||
|
||||
# Add the wasm toolchain
|
||||
RUN rustup target add wasm32-unknown-unknown
|
||||
|
||||
# Mount the caches and build
|
||||
RUN --mount=type=cache,target=/root/.cargo \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
|
@ -27,7 +32,7 @@ RUN --mount=type=cache,target=/root/.cargo \
|
|||
mv /serai/target/release/serai-processor /serai/bin
|
||||
|
||||
# Prepare Image
|
||||
FROM debian:bullseye-slim as image
|
||||
FROM debian:bookworm-slim as image
|
||||
LABEL description="STAGE 2: Copy and Run"
|
||||
|
||||
WORKDIR /home/serai
|
||||
|
@ -36,8 +41,8 @@ WORKDIR /home/serai
|
|||
COPY --from=builder /serai/bin/* /bin/
|
||||
COPY --from=builder /serai/AGPL-3.0 .
|
||||
|
||||
# Install openssl
|
||||
RUN apt update && apt upgrade -y && apt install -y libssl
|
||||
# Upgrade packages and install openssl
|
||||
RUN apt update && apt upgrade -y && apt install -y libssl-dev
|
||||
|
||||
# Run processor
|
||||
CMD ["serai-processor"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM docker.io/paritytech/ci-linux:production as builder
|
||||
FROM rust:1.71-slim-bookworm as builder
|
||||
LABEL description="STAGE 1: Build"
|
||||
|
||||
# Add files for build
|
||||
|
@ -16,34 +16,20 @@ ADD AGPL-3.0 /serai
|
|||
|
||||
WORKDIR /serai
|
||||
|
||||
# Update Rust
|
||||
RUN rustup update
|
||||
RUN apt update && apt upgrade -y && apt install -y make clang libssl-dev protobuf-compiler
|
||||
|
||||
# Install Solc @ 0.8.16
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
--mount=type=cache,target=/root/.local \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
pip3 install solc-select==0.2.1
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
--mount=type=cache,target=/root/.local \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
solc-select install 0.8.16
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
--mount=type=cache,target=/root/.local \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
solc-select use 0.8.16
|
||||
# Add the wasm toolchain
|
||||
RUN rustup target add wasm32-unknown-unknown
|
||||
|
||||
# Mount cargo and the Serai cache
|
||||
RUN --mount=type=cache,target=/root/.local \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
--mount=type=cache,target=/root/.cache \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
# Mount the caches and build
|
||||
RUN --mount=type=cache,target=/root/.cargo \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,target=/serai/target \
|
||||
cd substrate/node && cargo build --release
|
||||
|
||||
# Prepare Image
|
||||
FROM ubuntu:latest as image
|
||||
FROM debian:bookworm-slim as image
|
||||
LABEL description="STAGE 2: Copy and Run"
|
||||
|
||||
WORKDIR /home/serai
|
||||
|
@ -52,6 +38,9 @@ WORKDIR /home/serai
|
|||
COPY --from=builder /serai/target/release/ /bin/
|
||||
COPY --from=builder /serai/AGPL-3.0 .
|
||||
|
||||
# Upgrade packages
|
||||
RUN apt update && apt upgrade -y
|
||||
|
||||
# Run node
|
||||
EXPOSE 30333 9615 9933 9944
|
||||
CMD ["serai-node"]
|
||||
|
|
Loading…
Reference in a new issue