blob: 2f13dc331c41c4aa33e5b5e0975eb86438e58416 (
plain)
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
|
FROM rust:alpine AS builder
RUN \
apk -U add musl-dev git file make && \
git clone --depth=1 https://github.com/rustdesk/rustdesk-server.git /src && \
cd /src && \
cargo build -r --manifest-path /src/Cargo.toml
FROM busybox
ARG S6_OVERLAY_VERSION=3.1.0.1
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
RUN \
tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && \
tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz && \
rm /tmp/s6-overlay*.tar.xz
COPY rootfs /
COPY --from=builder /src/target/release/hbbr /usr/bin/hbbr
COPY --from=builder /src/target/release/hbbs /usr/bin/hbbs
COPY healthcheck.sh /usr/bin/healthcheck.sh
ENV RELAY relay.example.com
EXPOSE 21115 21116 21116/udp 21117 21118 21119
HEALTHCHECK --interval=10s --timeout=5s CMD /usr/bin/healthcheck.sh
WORKDIR /data
VOLUME /data
ENTRYPOINT ["/init"]
|