-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (24 loc) · 830 Bytes
/
Dockerfile
File metadata and controls
30 lines (24 loc) · 830 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
FROM rust AS builder
ARG BUILD_PROFILE=${BUILD_PROFILE:-release}
WORKDIR /src/
RUN rustup default nightly
RUN mkdir dummy
RUN echo 'fn main() {}' > dummy/dummy.rs
COPY config config
COPY data data
COPY tt tt
COPY router/Cargo.toml router/
RUN echo "[[bin]]\nname = \"dummy\"\npath = \"/src/dummy/dummy.rs\"" >> router/Cargo.toml
WORKDIR /src/router
RUN cargo build --bin dummy --profile=$BUILD_PROFILE
RUN rm -rf dummy router
WORKDIR /src/
COPY router router
RUN cargo install --path router --profile=$BUILD_PROFILE
FROM debian:trixie-slim
RUN apt-get update && apt-get install -y tini ca-certificates
COPY --from=builder /usr/local/cargo/bin/bruss_fetch /usr/local/bin/bruss_fetch
COPY --from=builder /usr/local/cargo/bin/bruss_route /usr/local/bin/bruss_route
WORKDIR /app
ENV PATH=/usr/local/cargo/bin:$PATH
CMD ["bash"]