mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-15 06:44:12 +00:00
bd1a647987
improves build time for a local dev container for a portal-hive test suite
27 lines
580 B
Docker
27 lines
580 B
Docker
FROM debian:stable-slim as build
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive TZ="Etc/UTC"
|
|
ENV NPROC=2
|
|
|
|
RUN apt update \
|
|
&& apt install make bash build-essential git -y \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
COPY ../../ /fluffy
|
|
|
|
WORKDIR /fluffy
|
|
|
|
RUN --mount=type=cache,target=/fluffy/vendor \
|
|
make deps -j${NPROC}
|
|
|
|
RUN --mount=type=cache,target=/fluffy/vendor <<EOF
|
|
set -e
|
|
make fluffy -j${NPROC}
|
|
cp /fluffy/build/fluffy /usr/local/bin/fluffy
|
|
EOF
|
|
|
|
FROM debian:stable-slim as app
|
|
|
|
COPY --from=build /usr/local/bin/fluffy /usr/local/bin/fluffy
|