diff --git a/docker/Dockerfile b/docker/Dockerfile index a05d468a997..e3d66c17019 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -66,6 +66,10 @@ ENV SHORT_SHA=${SHORT_SHA:-} ENV CARGO_HOME="${APP_HOME}/.cargo/" +# Set the default path for the zebrad binary +# TODO: users should be able to set this to a different value +WORKDIR /opt/zebrad/ + # In this stage we build tests (without running then) # # We also download needed dependencies for tests to work, from other images. @@ -117,7 +121,7 @@ cp ${APP_HOME}/target/release/zebrad /usr/local/bin && \ cp ${APP_HOME}/target/release/zebra-checkpoints /usr/local/bin # Copy the lightwalletd binary and source files to be able to run tests -COPY --from=electriccoinco/lightwalletd:latest /usr/local/bin/lightwalletd /usr/local/bin/ +# COPY --from=electriccoinco/lightwalletd:latest /usr/local/bin/lightwalletd /usr/local/bin/ COPY ./ ./ COPY ./docker/entrypoint.sh /etc/zebrad/entrypoint.sh @@ -140,20 +144,20 @@ FROM deps AS release ARG FEATURES -RUN --mount=type=bind,source=zebrad,target=zebrad \ +RUN --mount=type=bind,source=tower-batch-control,target=tower-batch-control \ + --mount=type=bind,source=tower-fallback,target=tower-fallback \ --mount=type=bind,source=zebra-chain,target=zebra-chain \ - --mount=type=bind,source=zebra-network,target=zebra-network \ - --mount=type=bind,source=zebra-state,target=zebra-state \ - --mount=type=bind,source=zebra-script,target=zebra-script \ --mount=type=bind,source=zebra-consensus,target=zebra-consensus \ - --mount=type=bind,source=zebra-rpc,target=zebra-rpc \ + --mount=type=bind,source=zebra-grpc,target=zebra-grpc \ + --mount=type=bind,source=zebra-network,target=zebra-network \ --mount=type=bind,source=zebra-node-services,target=zebra-node-services \ + --mount=type=bind,source=zebra-rpc,target=zebra-rpc \ + --mount=type=bind,source=zebra-scan,target=zebra-scan \ + --mount=type=bind,source=zebra-script,target=zebra-script \ + --mount=type=bind,source=zebra-state,target=zebra-state \ --mount=type=bind,source=zebra-test,target=zebra-test \ --mount=type=bind,source=zebra-utils,target=zebra-utils \ - --mount=type=bind,source=zebra-scan,target=zebra-scan \ - --mount=type=bind,source=zebra-grpc,target=zebra-grpc \ - --mount=type=bind,source=tower-batch-control,target=tower-batch-control \ - --mount=type=bind,source=tower-fallback,target=tower-fallback \ + --mount=type=bind,source=zebrad,target=zebrad \ --mount=type=bind,source=Cargo.toml,target=Cargo.toml \ --mount=type=bind,source=Cargo.lock,target=Cargo.lock \ --mount=type=cache,target=${APP_HOME}/target/ \ @@ -174,8 +178,6 @@ FROM debian:bookworm-slim AS runtime ARG APP_HOME ENV APP_HOME=${APP_HOME} WORKDIR ${APP_HOME} -COPY --link --from=release /usr/local/bin /usr/local/bin -COPY --link --from=release /entrypoint.sh / RUN apt-get update && \ apt-get install -y --no-install-recommends \