-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
35 lines (25 loc) · 927 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
# syntax=docker/dockerfile:1.2
FROM rustlang/rust:nightly-bookworm-slim AS builder
# hadolint ignore=DL3008
RUN apt-get update && apt-get install --no-install-recommends -y pkg-config libssl-dev
WORKDIR /liq-bot
COPY node_modules node_modules
COPY Cargo.lock .
COPY Cargo.toml .
COPY deployments deployments
COPY src src
COPY lib lib
RUN rustup component add rustfmt clippy
RUN cargo fmt --check \
&& cargo clippy -- -D warnings \
&& cargo build --release
FROM debian:bookworm-slim
# hadolint ignore=DL3008
RUN apt-get update && apt-get install --no-install-recommends -y ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /liq-bot
COPY --from=builder /liq-bot/target/release/liq-bot .
COPY --from=builder /liq-bot/deployments deployments
COPY --from=builder /liq-bot/node_modules/@exactly/protocol/deployments node_modules/@exactly/protocol/deployments
ENTRYPOINT [ "/liq-bot/liq-bot" ]