From 8ff40c604517b86cf128d9512f5441af0691d002 Mon Sep 17 00:00:00 2001 From: wileyj <2847772+wileyj@users.noreply.github.com> Date: Wed, 20 Jul 2022 16:04:12 -0700 Subject: [PATCH] Reverting Dockerfiles to develop - incorrectly using some logic from a different PR from same repo - removed 'puppet-chain' from dockerfiles --- Dockerfile | 10 ++++++++-- Dockerfile.debian => Dockerfile.stretch | 13 ++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) rename Dockerfile.debian => Dockerfile.stretch (70%) diff --git a/Dockerfile b/Dockerfile index 09493c983..055cc3df7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,17 @@ ARG GIT_COMMIT='No Commit Info' WORKDIR /src COPY . . + RUN apk add --no-cache musl-dev + RUN mkdir /out + RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json --release + RUN cp target/release/stacks-node /out -FROM --platform=${TARGETPLATFORM} alpine -COPY --from=build /out/stacks-node /bin/ +FROM alpine + +COPY --from=build /out/ /bin/ + CMD ["stacks-node", "mainnet"] diff --git a/Dockerfile.debian b/Dockerfile.stretch similarity index 70% rename from Dockerfile.debian rename to Dockerfile.stretch index 82a4e2385..7f5148dfe 100644 --- a/Dockerfile.debian +++ b/Dockerfile.stretch @@ -1,15 +1,22 @@ -FROM rust:bullseye as build +FROM rust:stretch as build ARG STACKS_NODE_VERSION="No Version Info" ARG GIT_BRANCH='No Branch Info' ARG GIT_COMMIT='No Commit Info' WORKDIR /src + COPY . . + RUN mkdir /out + RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json --release + RUN cp target/release/stacks-node /out -FROM --platform=${TARGETPLATFORM} debian:bullseye -COPY --from=build /out/stacks-node /bin/ +FROM debian:stretch-slim + +RUN apt update && apt install -y netcat +COPY --from=build /out/ /bin/ + CMD ["stacks-node", "mainnet"]