-
-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 668 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (24 loc) · 668 Bytes
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
FROM rust:1.62.1-slim-bullseye AS builder
ARG BAYARD_VERSION
WORKDIR /repo
RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
pkg-config \
libssl-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY . .
RUN rustup component add rustfmt --toolchain 1.62.1-x86_64-unknown-linux-gnu
RUN cargo build --release
FROM debian:bullseye-slim
WORKDIR /
RUN set -ex \
&& apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /repo/target/release/bayard /usr/local/bin
EXPOSE 5000 7000 9000
ENTRYPOINT [ "bayard" ]