test new dockerfile with s6-overlay

This commit is contained in:
Paolo Asperti 2022-06-20 14:48:57 +02:00
parent 59d82b4869
commit cf4b721d48
No known key found for this signature in database
GPG Key ID: 06D46905D19D5182
7 changed files with 39 additions and 0 deletions

31
docker/Dockerfile Executable file
View File

@ -0,0 +1,31 @@
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
ENV RELAY relay.example.com
EXPOSE 21115 21116 21116/udp 21117 21118 21119
WORKDIR /data
VOLUME /data
ENTRYPOINT ["/init"]

View File

@ -0,0 +1,3 @@
#!/command/execlineb -P
posix-cd /data
/usr/bin/hbbr

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1,3 @@
#!/command/execlineb -P
posix-cd /data
/usr/bin/hbbs -r $RELAY

View File

@ -0,0 +1 @@
longrun