-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
37 lines (23 loc) · 919 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# ------------------------------------------------------------------------------
# Cargo Build Stage
# ------------------------------------------------------------------------------
FROM rust:1.43.1 as cargo-build
RUN apt-get update
RUN apt-get install libssl-dev pkg-config -y
WORKDIR /usr/src/dgraph-ws-client
COPY . .
RUN cargo build --release
# ------------------------------------------------------------------------------
# Final Stage
# ------------------------------------------------------------------------------
FROM debian:buster-slim
ENV RUST_LOG=info
ENV DGRAPH_ALPHAS=http://localhost:9080
ENV LISTEN_ADDRESS=0.0.0.0:9000
ENV CONNECTION_CHECK_INTERVAL=5000
ENV CONNECTION_CHECK_RETRY=3
EXPOSE 9000
RUN apt-get update && apt-get install libssl1.1 -y
WORKDIR /opt/dgraph-ws-client
COPY --from=cargo-build /usr/src/dgraph-ws-client/target/release/dgraph-ws-client .
CMD ["./dgraph-ws-client"]