mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2024-11-24 04:12:34 +08:00
test new dockerfile with s6-overlay
This commit is contained in:
parent
59d82b4869
commit
cf4b721d48
31
docker/Dockerfile
Executable file
31
docker/Dockerfile
Executable 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"]
|
3
docker/rootfs/etc/s6-overlay/s6-rc.d/hbbr/run
Executable file
3
docker/rootfs/etc/s6-overlay/s6-rc.d/hbbr/run
Executable file
@ -0,0 +1,3 @@
|
||||
#!/command/execlineb -P
|
||||
posix-cd /data
|
||||
/usr/bin/hbbr
|
1
docker/rootfs/etc/s6-overlay/s6-rc.d/hbbr/type
Executable file
1
docker/rootfs/etc/s6-overlay/s6-rc.d/hbbr/type
Executable file
@ -0,0 +1 @@
|
||||
longrun
|
3
docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run
Executable file
3
docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run
Executable file
@ -0,0 +1,3 @@
|
||||
#!/command/execlineb -P
|
||||
posix-cd /data
|
||||
/usr/bin/hbbs -r $RELAY
|
1
docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/type
Executable file
1
docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/type
Executable file
@ -0,0 +1 @@
|
||||
longrun
|
0
docker/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/hbbr
Executable file
0
docker/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/hbbr
Executable file
0
docker/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/hbbs
Executable file
0
docker/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/hbbs
Executable file
Loading…
Reference in New Issue
Block a user