2020-01-29 14:55:03 -08:00
|
|
|
FROM rust:stretch as builder
|
2019-09-05 10:08:48 -07:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
make cmake g++ gcc
|
|
|
|
|
|
|
|
RUN mkdir /zebra
|
|
|
|
WORKDIR /zebra
|
|
|
|
|
|
|
|
ENV RUST_BACKTRACE 1
|
|
|
|
ENV CARGO_HOME /zebra/.cargo/
|
|
|
|
|
|
|
|
# Copy local code to the container image.
|
|
|
|
# Assumes that we are in the git repo.
|
|
|
|
COPY . .
|
|
|
|
RUN cargo fetch --verbose
|
|
|
|
COPY . .
|
|
|
|
RUN rustc -V; cargo -V; rustup -V; cargo test --all && cargo build --release
|
2020-01-28 18:07:49 -08:00
|
|
|
|
|
|
|
|
2020-01-29 14:55:03 -08:00
|
|
|
FROM debian:buster-slim
|
2020-06-16 23:57:14 -07:00
|
|
|
COPY --from=builder /zebra/target/release/zebrad /
|
2020-08-13 00:31:09 -07:00
|
|
|
RUN echo "[tracing]\nendpoint_addr = '0.0.0.0:3000'" > /zebrad.toml
|
2020-06-18 16:03:25 -07:00
|
|
|
EXPOSE 3000 8233 18233
|
2020-06-16 23:57:14 -07:00
|
|
|
CMD [ "/zebrad", "start" ]
|