fix local dev container for portal-hive (#1931)

* fix local dev container for portal-hive
This commit is contained in:
Daniel Sobol 2023-12-11 16:56:00 +03:00 committed by GitHub
parent 78ec80eea0
commit dc55ee0c87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 12 deletions

View File

@ -2,25 +2,26 @@ FROM debian:stable-slim as build
ENV DEBIAN_FRONTEND=noninteractive TZ="Etc/UTC" ENV DEBIAN_FRONTEND=noninteractive TZ="Etc/UTC"
ENV NPROC=2 ENV NPROC=2
ENV NIMFLAGS_COMMON="-d:disableMarchNative --gcc.options.debug:'-g1' --clang.options.debug:'-gline-tables-only'"
RUN apt update \ RUN apt update \
&& apt install make bash build-essential git -y \ && apt install make bash build-essential git -y \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY ../../ /fluffy COPY ../../ /nimbus-eth1
WORKDIR /fluffy WORKDIR /nimbus-eth1
RUN --mount=type=cache,target=/fluffy/vendor \ RUN mv vendor vendor.orig
make deps -j${NPROC}
RUN --mount=type=cache,target=/fluffy/vendor <<EOF RUN --mount=type=cache,target=/nimbus-eth1/build --mount=type=cache,target=/nimbus-eth1/vendor \
set -e mv vendor.orig vendor && \
make fluffy -j${NPROC} make -j${NPROC} NIMFLAGS="${NIMFLAGS_COMMON} --parallelBuild:${NPROC}" V=1 update
cp /fluffy/build/fluffy /usr/local/bin/fluffy
EOF RUN --mount=type=cache,target=/nimbus-eth1/build --mount=type=cache,target=/nimbus-eth1/vendor \
make -j${NPROC} NIMFLAGS="${NIMFLAGS_COMMON} --parallelBuild:${NPROC}" fluffy && \
mv build/fluffy /usr/local/bin/fluffy
FROM debian:stable-slim as app FROM debian:stable-slim as app
COPY --from=build /usr/local/bin/fluffy /usr/local/bin/fluffy COPY --from=build /usr/local/bin/fluffy /usr/local/bin/fluffy

View File

@ -1,3 +1,4 @@
vendor/
build/ build/
.git/ vendor/*/vendor/*/bin/
**/*.o
**/*.a