-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
31 lines (24 loc) · 1.15 KB
/
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
FROM rust:1.78.0-bookworm as builder
WORKDIR /breakwater
COPY breakwater-parser/ breakwater-parser/
COPY breakwater/ breakwater/
COPY Cargo.toml .
COPY Cargo.lock .
COPY rust-toolchain.toml .
COPY Arial.ttf .
RUN apt-get update && \
apt-get install -y clang libvncserver-dev && \
rm -rf /var/lib/apt/lists/*
# Installing it explicitly to make better use of the docker cache
RUN rustup toolchain install nightly
# We don't want to e.g. set "-C target-cpu=native", so that the binary should run everywhere
# Also we can always build with vnc server support as the docker image contains all needed dependencies in any case
# While the "native-display" feature compiles successfully, we'd rather not offer the CLI option, as it might cause
# users to think it should work (which it doesn't). So let's not enable that feature
RUN RUSTFLAGS='' cargo build --release --no-default-features --features vnc,binary-set-pixel
FROM debian:bookworm-slim as final
RUN apt-get update && \
apt-get install -y libvncserver1 ffmpeg && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /breakwater/target/release/breakwater /usr/local/bin/breakwater
ENTRYPOINT ["breakwater"]