Skip to content

Commit

Permalink
update Dockerfile and Cargo.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
dshiell committed Aug 7, 2024
1 parent 466e2df commit 344be48
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
FROM lukemathwalker/cargo-chef:latest-rust-1-slim-buster AS chef
WORKDIR /app/
RUN apt update && apt install -y libssl-dev pkg-config

FROM chef AS planner

COPY src ./src
COPY Cargo.toml .
COPY Cargo.lock .
FROM rust:alpine3.20 as builder

# Install build dependencies
RUN apk update && apk add --no-cache \
build-base \
gcc \
musl-dev \
linux-headers \
libressl-dev \
pkgconfig \
&& rm -rf /var/cache/apk/*

RUN cargo chef prepare --recipe-path recipe.json

FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
WORKDIR /app/

COPY src ./src
COPY Cargo.toml .
COPY Cargo.lock .

RUN cargo update -p time # fix a type regression
RUN cargo build --release

FROM debian:buster-slim
RUN apt update \
&& apt install -y openssl ca-certificates
RUN update-ca-certificates
FROM alpine:3.20
RUN apk update && apk add --no-cache \
ca-certificates \
&& rm -rf /var/cache/apk/*
# openssl?

COPY --from=builder /app/target/release/cached-eth-rpc /app/cached-eth-rpc

Expand Down

0 comments on commit 344be48

Please sign in to comment.