mirror of
https://github.com/mempool/mempool.git
synced 2025-03-13 11:36:07 +01:00
Update Docker images
This commit is contained in:
parent
d82a9f6c6a
commit
e6f13766d3
2 changed files with 19 additions and 12 deletions
|
@ -1,20 +1,20 @@
|
|||
FROM node:20.15.0-buster-slim AS builder
|
||||
FROM rust:1.84-bookworm AS builder
|
||||
|
||||
ARG commitHash
|
||||
ENV MEMPOOL_COMMIT_HASH=${commitHash}
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y curl ca-certificates && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
||||
apt-get install -y nodejs build-essential python3 pkg-config && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y build-essential python3 pkg-config curl ca-certificates
|
||||
|
||||
# Install Rust via rustup
|
||||
RUN CPU_ARCH=$(uname -m); if [ "$CPU_ARCH" = "armv7l" ]; then c_rehash; fi
|
||||
#RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
|
||||
#Workaround to run on github actions from https://github.com/rust-lang/rustup/issues/2700#issuecomment-1367488985
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sed 's#/proc/self/exe#\/bin\/sh#g' | sh -s -- -y --default-toolchain stable
|
||||
ENV PATH="/root/.cargo/bin:$PATH"
|
||||
ENV PATH="/usr/local/cargo/bin:$PATH"
|
||||
|
||||
COPY --from=backend . .
|
||||
COPY --from=rustgbt . ../rust/
|
||||
|
@ -24,7 +24,14 @@ RUN npm install --omit=dev --omit=optional
|
|||
WORKDIR /build
|
||||
RUN npm run package
|
||||
|
||||
FROM node:20.15.0-buster-slim
|
||||
FROM rust:1.84-bookworm AS runtime
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y curl ca-certificates && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /backend
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:20.15.0-buster-slim AS builder
|
||||
FROM node:22-bookworm-slim AS builder
|
||||
|
||||
ARG commitHash
|
||||
ENV DOCKER_COMMIT_HASH=${commitHash}
|
||||
|
|
Loading…
Add table
Reference in a new issue