Skip to content

Commit

Permalink
fix(docker): use a standard entrypoint directory
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavovalverde committed Aug 29, 2024
1 parent 1c242c3 commit bd923da
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ ENV CARGO_HOME="${APP_HOME}/.cargo/"
# TODO: users should be able to set this to a different value
WORKDIR /opt/zebrad/

# Copy the entrypoint script to be used on both images
COPY ./docker/entrypoint.sh /etc/zebrad/entrypoint.sh

# In this stage we build tests (without running then)
#
# We also download needed dependencies for tests to work, from other images.
Expand Down Expand Up @@ -121,11 +124,9 @@ 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

# Entrypoint environment variables
ENV ENTRYPOINT_FEATURES=${ENTRYPOINT_FEATURES}
# We repeat the ARGs here, so they are available in the entrypoint.sh script for $RUN_ALL_EXPERIMENTAL_TESTS
Expand Down Expand Up @@ -166,8 +167,6 @@ RUN --mount=type=bind,source=tower-batch-control,target=tower-batch-control \
cargo build --locked --release --features "${FEATURES}" --package zebrad --bin zebrad && \
cp ${APP_HOME}/target/release/zebrad /usr/local/bin

COPY ./docker/entrypoint.sh ./

# This stage is only used when deploying nodes or when only the resulting zebrad binary is needed
#
# To save space, this step starts from scratch using debian, and only adds the resulting
Expand Down Expand Up @@ -220,7 +219,7 @@ RUN mkdir -p ${ZEBRA_CONF_DIR} && chown ${UID}:${UID} ${ZEBRA_CONF_DIR} \
&& chown ${UID}:${UID} ${APP_HOME}

COPY --from=release ${APP_HOME}/target/release/zebrad /usr/local/bin
COPY --from=release ${APP_HOME}/entrypoint.sh /etc/zebrad
COPY --from=release /etc/zebrad/entrypoint.sh /etc/zebrad

# Expose configured ports
EXPOSE 8233 18233
Expand Down

0 comments on commit bd923da

Please sign in to comment.