-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (18 loc) · 823 Bytes
/
Dockerfile
File metadata and controls
23 lines (18 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM debian:10-slim as build-env
USER root
RUN apt-get update && apt-get install -y libssl-dev pkg-config libsodium-dev git curl
#
# Checkout and compile source code
ARG repository="https://github.com/adonagy/monitoring-test.git"
ARG rust_toolchain="stable-x86_64-unknown-linux-gnu"
ARG SOURCE_BRANCH
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain ${rust_toolchain} -y
ENV PATH=/root/.cargo/bin:$PATH
ENV SODIUM_USE_PKG_CONFIG=1
RUN apt-get install -y clang libclang-dev
RUN git clone ${repository} --branch ${SOURCE_BRANCH-master} && cd monitoring-test && cargo build --release #11
FROM debian:10-slim
USER root
RUN apt-get update && apt-get install -y libssl-dev openssl curl
COPY --from=build-env /monitoring-test/target/release/monitoring-test /monitoring-test
ENTRYPOINT [ "/monitoring-test" ]