diff options
author | RustDesk <[email protected]> | 2022-06-29 01:02:44 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-29 01:02:44 +0800 |
commit | 6c6dba5a8ace83bd0d11022cf13e5b6a36f0a9e3 (patch) | |
tree | 3a62849713f03efd657e0c9c72e6faaef96eb201 /docker | |
parent | c87e7bc848bc2e38f0c2df8b4075d4e7e538110a (diff) | |
parent | 104fb00d88c5252a432b4b2fb11d2b05f0f7fd2c (diff) | |
download | rustdesk-server-6c6dba5a8ace83bd0d11022cf13e5b6a36f0a9e3.tar.gz rustdesk-server-6c6dba5a8ace83bd0d11022cf13e5b6a36f0a9e3.zip |
Merge pull request #43 from paspo/gh_actions
added build workflow
Diffstat (limited to 'docker')
-rwxr-xr-x | docker/Dockerfile | 12 | ||||
-rwxr-xr-x | docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run | 8 | ||||
-rwxr-xr-x | docker/rootfs/usr/bin/healthcheck.sh | 4 |
3 files changed, 10 insertions, 14 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 64d11bf..c68677b 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,11 +1,3 @@ -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:stable ARG S6_OVERLAY_VERSION=3.1.0.1 @@ -17,11 +9,9 @@ RUN \ 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 +ENV ENCRYPTED_ONLY 0 EXPOSE 21115 21116 21116/udp 21117 21118 21119 diff --git a/docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run b/docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run index ae3b02a..383f7ce 100755 --- a/docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run +++ b/docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run @@ -1,3 +1,5 @@ -#!/command/execlineb -P -posix-cd /data -/usr/bin/hbbs -r $RELAY +#!/command/with-contenv sh +cd /data +PARAMS= +[ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k _" +/usr/bin/hbbs -r $RELAY $PARAMS diff --git a/docker/rootfs/usr/bin/healthcheck.sh b/docker/rootfs/usr/bin/healthcheck.sh new file mode 100755 index 0000000..f7ae0d7 --- /dev/null +++ b/docker/rootfs/usr/bin/healthcheck.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +/package/admin/s6/command/s6-svstat /run/s6-rc/servicedirs/hbbr || exit 1 +/package/admin/s6/command/s6-svstat /run/s6-rc/servicedirs/hbbs || exit 1 |