From 1962647b1ae94f001cd77eeff6f5816f556fbaa2 Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Tue, 21 Jun 2022 16:15:31 +0200 Subject: [PATCH 1/5] added build workflow --- .github/workflows/build.yaml | 192 +++++++++++++++++++++++++++ README.md | 2 + docker/Dockerfile | 11 -- docker/rootfs/usr/bin/healthcheck.sh | 4 + 4 files changed, 198 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/build.yaml create mode 100755 docker/rootfs/usr/bin/healthcheck.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..f14f2c0 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,192 @@ +name: build + +# ------------- NOTE +# please setup some secrets before running this workflow: +# DOCKER_IMAGE should be the target image name on docker hub (e.g. "rustdesk/rustdesk-server" ) +# DOCKER_USERNAME is the username you normally use to login at https://hub.docker.com/ +# DOCKER_PASSWORD is a token you should create under "account settings / security" with read/write access + +on: + workflow_dispatch: + schedule: + - cron: '0 10 * * 2' + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+' + +env: + CARGO_TERM_COLOR: always + +jobs: + + build: + + name: Build - ${{ matrix.job.name }} + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + job: + - { name: "amd64", target: "x86_64-unknown-linux-musl" } + - { name: "arm64v8", target: "aarch64-unknown-linux-musl" } + - { name: "armv7", target: "armv7-unknown-linux-musleabihf" } + - { name: "i386", target: "i686-unknown-linux-musl" } + + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + default: true + target: ${{ matrix.job.target }} + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --all-features --target=${{ matrix.job.target }} + use-cross: true + + # - name: Run tests + # run: cargo test --verbose + + - name: Publish Artifacts + uses: actions/upload-artifact@v3 + with: + name: binaries-${{ matrix.job.name }} + path: | + target/${{ matrix.job.target }}/release/hbbr + target/${{ matrix.job.target }}/release/hbbs + if-no-files-found: error + + + release: + + name: Github release + needs: build + runs-on: ubuntu-22.04 + + steps: + + - name: Download binaries (amd64) + uses: actions/download-artifact@v3 + with: + name: binaries-amd64 + path: amd64 + + - name: Download binaries (arm64v8) + uses: actions/download-artifact@v3 + with: + name: binaries-arm64v8 + path: arm64v8 + + - name: Download binaries (armv7) + uses: actions/download-artifact@v3 + with: + name: binaries-armv7 + path: armv7 + + - name: Download binaries (i386) + uses: actions/download-artifact@v3 + with: + name: binaries-i386 + path: i386 + + - name: Rename files + run: for arch in amd64 arm64v8 armv7 i386 ; do for b in hbbr hbbs ; do mv -v ${arch}/${b} ${arch}/${b}-${arch} ; done ; done + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + draft: true + files: | + amd64/* + arm64v8/* + armv7/* + i386/* + + + docker: + + name: Docker push - ${{ matrix.job.name }} + needs: build + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + job: + - { name: "amd64", docker_platform: "linux/amd64" } + - { name: "arm64v8", docker_platform: "linux/arm64" } + - { name: "armv7", docker_platform: "linux/arm/v7" } + - { name: "i386", docker_platform: "linux/386" } + + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: Download binaries + uses: actions/download-artifact@v3 + with: + name: binaries-${{ matrix.job.name }} + path: docker/rootfs/usr/bin + + - name: Make binaries executable + run: chmod -v a+x docker/rootfs/usr/bin/* + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to Docker Hub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: registry.hub.docker.com/${{ secrets.DOCKER_IMAGE }} + + - name: Build and push Docker image + uses: docker/build-push-action@v3 + with: + context: "./docker" + platforms: ${{ matrix.job.docker_platform }} + push: true + tags: "${{ secrets.DOCKER_IMAGE }}:latest-${{ matrix.job.name }}" + labels: ${{ steps.meta.outputs.labels }} + + + docker-manifest: + + name: Docker manifest + needs: docker + runs-on: ubuntu-22.04 + + steps: + + - name: Log in to Docker Hub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Create and push manifest + uses: Noelware/docker-manifest-action@master + with: + base-image: ${{ secrets.DOCKER_IMAGE }}:latest + extra-images: ${{ secrets.DOCKER_IMAGE }}:latest-amd64,${{ secrets.DOCKER_IMAGE }}:latest-arm64v8,${{ secrets.DOCKER_IMAGE }}:latest-armv7,${{ secrets.DOCKER_IMAGE }}:latest-i386 + push: true diff --git a/README.md b/README.md index 8ccb8d8..668f617 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![build](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml/badge.svg)](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml) + # RustDesk Server Program [**Download**](https://github.com/rustdesk/rustdesk-server/releases) diff --git a/docker/Dockerfile b/docker/Dockerfile index 64d11bf..0da0e34 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,9 +9,6 @@ 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 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 From 2c25ee12e53d970927fcc0a7699e56f6b274993f Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Wed, 22 Jun 2022 13:39:30 +0200 Subject: [PATCH 2/5] no scheduled builds --- .github/workflows/build.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f14f2c0..af59187 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,8 +8,6 @@ name: build on: workflow_dispatch: - schedule: - - cron: '0 10 * * 2' push: tags: - 'v[0-9]+.[0-9]+.[0-9]+' From 38dee4794a3299dec035b84b4f0a1c0e8ab1a230 Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Wed, 22 Jun 2022 18:51:41 +0200 Subject: [PATCH 3/5] docker images tagged with current git tag + custom --- .github/workflows/build.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index af59187..283002e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,6 +15,7 @@ on: env: CARGO_TERM_COLOR: always + LATEST_TAG: devel jobs: @@ -163,7 +164,9 @@ jobs: context: "./docker" platforms: ${{ matrix.job.docker_platform }} push: true - tags: "${{ secrets.DOCKER_IMAGE }}:latest-${{ matrix.job.name }}" + tags: | + ${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-${{ matrix.job.name }} + ${{ secrets.DOCKER_IMAGE }}:${{ github.ref_name }}-${{ matrix.job.name }} labels: ${{ steps.meta.outputs.labels }} @@ -185,6 +188,13 @@ jobs: - name: Create and push manifest uses: Noelware/docker-manifest-action@master with: - base-image: ${{ secrets.DOCKER_IMAGE }}:latest - extra-images: ${{ secrets.DOCKER_IMAGE }}:latest-amd64,${{ secrets.DOCKER_IMAGE }}:latest-arm64v8,${{ secrets.DOCKER_IMAGE }}:latest-armv7,${{ secrets.DOCKER_IMAGE }}:latest-i386 + base-image: ${{ secrets.DOCKER_IMAGE }}:${{ github.ref_name }} + extra-images: ${{ secrets.DOCKER_IMAGE }}:${{ github.ref_name }}-amd64,${{ secrets.DOCKER_IMAGE }}:${{ github.ref_name }}-arm64v8,${{ secrets.DOCKER_IMAGE }}:${{ github.ref_name }}-armv7,${{ secrets.DOCKER_IMAGE }}:${{ github.ref_name }}-i386 + push: true + + - name: Create and push manifest + uses: Noelware/docker-manifest-action@master + with: + base-image: ${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }} + extra-images: ${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-amd64,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-armv7,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-i386 push: true From e4b2fc15b6f4251b60ade38d5a0a61e6a4fed744 Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Wed, 22 Jun 2022 20:56:01 +0200 Subject: [PATCH 4/5] added ENV forcing only encrypted connections --- docker/Dockerfile | 1 + docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0da0e34..c68677b 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -11,6 +11,7 @@ RUN \ COPY rootfs / 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 From 104fb00d88c5252a432b4b2fb11d2b05f0f7fd2c Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Fri, 24 Jun 2022 09:32:39 +0200 Subject: [PATCH 5/5] classic image support --- .github/workflows/build.yaml | 108 +++++++++++++++++++++++-- README.md | 148 +++++++++++++++++++++++++++++++++-- docker-classic/Dockerfile | 4 + 3 files changed, 246 insertions(+), 14 deletions(-) create mode 100755 docker-classic/Dockerfile diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 283002e..633c2d4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,7 +2,8 @@ name: build # ------------- NOTE # please setup some secrets before running this workflow: -# DOCKER_IMAGE should be the target image name on docker hub (e.g. "rustdesk/rustdesk-server" ) +# DOCKER_IMAGE should be the target image name on docker hub (e.g. "rustdesk/rustdesk-server-s6" ) +# DOCKER_IMAGE_CLASSIC should be the target image name on docker hub for the old build (e.g. "rustdesk/rustdesk-server" ) # DOCKER_USERNAME is the username you normally use to login at https://hub.docker.com/ # DOCKER_PASSWORD is a token you should create under "account settings / security" with read/write access @@ -15,10 +16,11 @@ on: env: CARGO_TERM_COLOR: always - LATEST_TAG: devel - + LATEST_TAG: latest + jobs: + # binary build build: name: Build - ${{ matrix.job.name }} @@ -64,7 +66,7 @@ jobs: target/${{ matrix.job.target }}/release/hbbs if-no-files-found: error - + # github (draft) release with all binaries release: name: Github release @@ -110,7 +112,7 @@ jobs: armv7/* i386/* - + # docker build and push of single-arch images docker: name: Docker push - ${{ matrix.job.name }} @@ -158,6 +160,14 @@ jobs: with: images: registry.hub.docker.com/${{ secrets.DOCKER_IMAGE }} + - name: Get git tag + id: vars + run: | + T=${GITHUB_REF#refs/*/} + M=${T%%.*} + echo "GIT_TAG=$T" >> $GITHUB_ENV + echo "MAJOR_TAG=$M" >> $GITHUB_ENV + - name: Build and push Docker image uses: docker/build-push-action@v3 with: @@ -166,10 +176,11 @@ jobs: push: true tags: | ${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-${{ matrix.job.name }} - ${{ secrets.DOCKER_IMAGE }}:${{ github.ref_name }}-${{ matrix.job.name }} + ${{ secrets.DOCKER_IMAGE }}:${{ env.GIT_TAG }}-${{ matrix.job.name }} + ${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }}-${{ matrix.job.name }} labels: ${{ steps.meta.outputs.labels }} - + # docker build and push of multiarch images docker-manifest: name: Docker manifest @@ -185,6 +196,31 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Get git tag + id: vars + run: | + T=${GITHUB_REF#refs/*/} + M=${T%%.*} + echo "GIT_TAG=$T" >> $GITHUB_ENV + echo "MAJOR_TAG=$M" >> $GITHUB_ENV + + # manifest for :1.2.3 tag + - name: Create and push manifest + uses: Noelware/docker-manifest-action@master + with: + base-image: ${{ secrets.DOCKER_IMAGE }}:${{ env.GIT_TAG }} + extra-images: ${{ secrets.DOCKER_IMAGE }}:${{ env.GIT_TAG }}-amd64,${{ secrets.DOCKER_IMAGE }}:${{ env.GIT_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE }}:${{ env.GIT_TAG }}-armv7,${{ secrets.DOCKER_IMAGE }}:${{ env.GIT_TAG }}-i386 + push: true + + # manifest for :1 tag (major release) + - name: Create and push manifest + uses: Noelware/docker-manifest-action@master + with: + base-image: ${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }} + extra-images: ${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }}-amd64,${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }}-armv7,${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }}-i386 + push: true + + # manifest for :latest tag - name: Create and push manifest uses: Noelware/docker-manifest-action@master with: @@ -198,3 +234,61 @@ jobs: base-image: ${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }} extra-images: ${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-amd64,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-armv7,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-i386 push: true + + + + # docker build and push of classic images + docker-classic: + + name: Docker push classic - ${{ matrix.job.name }} + needs: build + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + job: + - { name: "amd64", docker_platform: "linux/amd64", tag: "latest" } + - { name: "arm64v8", docker_platform: "linux/arm64", tag: "latest-arm64v8" } + + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: Download binaries + uses: actions/download-artifact@v3 + with: + name: binaries-${{ matrix.job.name }} + path: docker-classic/ + + - name: Make binaries executable + run: chmod -v a+x docker-classic/hbb* + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to Docker Hub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: registry.hub.docker.com/${{ secrets.DOCKER_IMAGE_CLASSIC }} + + - name: Build and push Docker image + uses: docker/build-push-action@v3 + with: + context: "./docker-classic" + platforms: ${{ matrix.job.docker_platform }} + push: true + tags: | + ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ matrix.job.tag }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index 668f617..e3745cd 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,161 @@ -[![build](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml/badge.svg)](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml) - # RustDesk Server Program +[![build](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml/badge.svg)](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml) + [**Download**](https://github.com/rustdesk/rustdesk-server/releases) -[**Manual**](https://rustdesk.com/docs/en/self-host/) +[**Manual**](https://rustdesk.com/docs/en/self-host/) [**FAQ**](https://github.com/rustdesk/rustdesk/wiki/FAQ) Self-host your own RustDesk server, it is free and open source. +## How to build manually + ```bash cargo build --release ``` Two executables will be generated in target/release. - - hbbs - RustDesk ID/Rendezvous server - - hbbr - RustDesk relay server + +- hbbs - RustDesk ID/Rendezvous server +- hbbr - RustDesk relay server + +You can find updated binaries on the [releases](https://github.com/rustdesk/rustdesk-server/releases) page. If you wanna develop your own server, [rustdesk-server-demo](https://github.com/rustdesk/rustdesk-server-demo) might be a better and simpler start for you than this repo. -## docker-compose +## Docker images -If you have Docker and would like to use it, an included `docker-compose.yml` file is included. Edit line 16 to point to your relay server (the one listening on port 21117). You can also edit the volume lines (L18 and L33) if you need. +Docker images are automatically generated and published on every github release. We have 2 kind of images. + +### Classic image + +These images are build against `ubuntu-20.04` with the only addition of the binaries (both hbbr and hbbs). They're available on [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server/) with these tags: + +| architecture | image:tag | +| --- | --- | +| amd64 | `rustdesk/rustdesk-server:latest` | +| arm64v8 | `rustdesk/rustdesk-server:latest-arm64v8` | + +You can start these images directly with `docker run` with these commands: + +```bash +docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v "$PWD:/root" -d rustdesk/rustdesk-server:latest hbbs -r +docker run --name hbbr -p 21117:21117 -p 21119:21119 -v "$PWD:/root" -d rustdesk/rustdesk-server:latest hbbr +``` + +The `relay-server-ip` parameter is the IP address (or dns name) of the server running these containers. The **optional** `port` parameter has to be used if you use a port different than **21117** for `hbbr`. + +You can also use docker-compose, using this configuration as a template: + +```yaml +version: '3' + +networks: + rustdesk-net: + external: false + +services: + hbbs: + container_name: hbbs + ports: + - 21115:21115 + - 21116:21116 + - 21116:21116/udp + - 21118:21118 + image: rustdesk/rustdesk-server:latest + command: hbbs -r rustdesk.example.com:21117 + volumes: + - ./hbbs:/root + networks: + - rustdesk-net + depends_on: + - hbbr + restart: unless-stopped + + hbbr: + container_name: hbbr + ports: + - 21117:21117 + - 21119:21119 + image: rustdesk/rustdesk-server:latest + command: hbbr + volumes: + - ./hbbr:/root + networks: + - rustdesk-net + restart: unless-stopped +``` + +Edit line 16 to point to your relay server (the one listening on port 21117). You can also edit the volume lines (L18 and L33) if you need. (docker-compose credit goes to @lukebarone and @QuiGonLeong) + +## S6-overlay based images + +These images are build against `busybox:stable` with the addition of the binaries (both hbbr and hbbs) and [S6-overlay](https://github.com/just-containers/s6-overlay). They're available on [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server-36/) with these tags: + +| architecture | version | image:tag | +| --- | --- | --- | +| multiarch | latest | `rustdesk/rustdesk-server-s6:latest` | +| amd64 | latest | `rustdesk/rustdesk-server-s6:latest-amd64` | +| i386 | latest | `rustdesk/rustdesk-server-s6:latest-i386` | +| arm64v8 | latest | `rustdesk/rustdesk-server-s6:latest-arm64v8` | +| armv7 | latest | `rustdesk/rustdesk-server-s6:latest-armv7` | +| multiarch | 2 | `rustdesk/rustdesk-server-s6:2` | +| amd64 | 2 | `rustdesk/rustdesk-server-s6:2-amd64` | +| i386 | 2 | `rustdesk/rustdesk-server-s6:2-i386` | +| arm64v8 | 2 | `rustdesk/rustdesk-server-s6:2-arm64v8` | +| armv7 | 2 | `rustdesk/rustdesk-server-s6:2-armv7` | +| multiarch | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0` | +| amd64 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-amd64` | +| i386 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-i386` | +| arm64v8 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-arm64v8` | +| armv7 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-armv7` | + +You're strongly encuraged to use the `multiarch` image either with the `major version` or `latest` tag. + +The S6-overlay acts as a supervisor and keeps both process running, so with this image there's no need to have two separate running containers. + +You can start these images directly with `docker run` with this command: + +```bash +docker run --name rustdesk-server \ + -p 21115:21115 -p 21116:21116 -p 21116:21116/udp \ + -p 21117:21117 -p 21118:21118 -p 21119:21119 \ + -e "RELAY=rustdeskrelay.example.com" \ + -e "ENCRYPTED_ONLY=1" \ + -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest +``` + +Or you can use a docker-compose file: + +```yaml +version: '3' + +services: + rustdesk-server: + container_name: rustdesk-server + ports: + - 21115:21115 + - 21116:21116 + - 21116:21116/udp + - 21117:21117 + - 21118:21118 + - 21119:21119 + image: rustdesk/rustdesk-server-s6:latest + environment: + - "RELAY=rustdesk.example.com:21117" + - "ENCRYPTED_ONLY=1" + volumes: + - ./data:/data + restart: unless-stopped +``` + +We use these environment variables: + +| variable | optional | description | +| --- | --- | --- | +| RELAY | no | the IP address/DNS name of the machine running this container | +| ENCRYPTED_ONLY | yes | if set to **"1"** unencrypted connection will not be accepted | diff --git a/docker-classic/Dockerfile b/docker-classic/Dockerfile new file mode 100755 index 0000000..694ab6e --- /dev/null +++ b/docker-classic/Dockerfile @@ -0,0 +1,4 @@ +FROM ubuntu:20.04 +COPY hbbs /usr/bin/hbbs +COPY hbbr /usr/bin/hbbr +WORKDIR /root