File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 11FROM rust:1.88.0-bullseye AS builder
22RUN apt-get update && apt-get -y upgrade && apt-get install -y cmake libclang-dev
3- COPY . lighthouse
3+ WORKDIR /lighthouse
4+
45ARG FEATURES
56ARG PROFILE=release
67ARG CARGO_USE_GIT_CLI=true
78ENV FEATURES=$FEATURES
89ENV PROFILE=$PROFILE
910ENV CARGO_NET_GIT_FETCH_WITH_CLI=$CARGO_USE_GIT_CLI
10- RUN cd lighthouse && make
11+ ENV CARGO_INCREMENTAL=1
12+
13+ COPY . .
14+ # Persist the registry and target file across builds. See: https://docs.docker.com/build/cache/optimize/#use-cache-mounts
15+ RUN --mount=type=cache,target=/usr/local/cargo/registry \
16+ --mount=type=cache,target=/lighthouse/target \
17+ make
1118
1219FROM ubuntu:22.04
1320RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \
1421 libssl-dev \
1522 ca-certificates \
1623 && apt-get clean \
1724 && rm -rf /var/lib/apt/lists/*
18- COPY --from=builder /usr/local/cargo/bin/lighthouse /usr/local/bin/lighthouse
25+ COPY --from=builder /usr/local/cargo/bin/lighthouse /usr/local/bin/lighthouse
You can’t perform that action at this time.
0 commit comments