Skip to content

Commit

Permalink
ping/rust/Dockerfile: Build in debug mode instead of release mode (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden authored Nov 4, 2022
1 parent 3d51093 commit b97b36a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ping/rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN cd ./plan/ && \
cargo update --dry-run && \
cargo fetch && \
# use a default feature to rely on docker caching.
cargo build --release --features "libp2pv0450"
cargo build --features "libp2pv0450"

ARG CARGO_PATCH=""
ARG CARGO_REMOVE=""
Expand All @@ -28,7 +28,7 @@ RUN cp ./plan/Cargo.toml ./plan/Cargo.lock /tmp/
COPY ./plan/${PLAN_PATH} ./plan

# This is in order to make sure `main.rs`s mtime timestamp is updated to avoid the dummy `main`
# remaining in the release binary.
# remaining in the binary.
# https://github.com/rust-lang/cargo/issues/9598
RUN touch ./plan/src/main.rs

Expand All @@ -37,10 +37,10 @@ RUN mv /tmp/Cargo.toml /tmp/Cargo.lock ./plan
ARG CARGO_FEATURES=""

RUN cd ./plan/ && \
cargo build --release --features="${CARGO_FEATURES}"
cargo build --features="${CARGO_FEATURES}"

FROM debian:bullseye-slim
COPY --from=builder /usr/src/testplan/plan/target/release/testplan /usr/local/bin/testplan
COPY --from=builder /usr/src/testplan/plan/target/debug/testplan /usr/local/bin/testplan
EXPOSE 6060
ENV RUST_BACKTRACE=1
ENTRYPOINT ["testplan"]

0 comments on commit b97b36a

Please sign in to comment.