From fed35dad7e8a98059ce3a080f0e6122004e6aa65 Mon Sep 17 00:00:00 2001 From: Christopher Schnick Date: Mon, 16 Sep 2024 14:38:46 +0200 Subject: [PATCH] Restructuring --- .github/workflows/docker-build.yml | 15 +++ .../{docker-image.yml => docker-push.yml} | 8 +- Dockerfile | 18 ++-- README.md | 97 ++++++++++++++++++- 4 files changed, 118 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/docker-build.yml rename .github/workflows/{docker-image.yml => docker-push.yml} (86%) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..6f263bc --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,15 @@ +name: Docker Build + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag xpipe-webtop:$(date +%s) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-push.yml similarity index 86% rename from .github/workflows/docker-image.yml rename to .github/workflows/docker-push.yml index 2abaf2d..cdd5a05 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-push.yml @@ -1,4 +1,4 @@ -name: Docker Image CI +name: Docker Push on: push: @@ -9,12 +9,6 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag xpipe-webtop:$(date +%s) build-and-push-image: runs-on: ubuntu-latest permissions: diff --git a/Dockerfile b/Dockerfile index 070289d..bc138ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,7 @@ FROM ghcr.io/linuxserver/baseimage-kasmvnc:ubuntunoble -# set version label -ARG BUILD_DATE -ARG VERSION -LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="thelamer" ARG DEBIAN_FRONTEND="noninteractive" -# title ENV TITLE="XPipe Webtop" ARG XPIPE_VERSION="11.3" ARG XPIPE_REPOSITORY="xpipe-io/xpipe" @@ -15,12 +9,6 @@ ARG XPIPE_REPOSITORY="xpipe-io/xpipe" # prevent Ubuntu's firefox stub from being installed COPY /root/etc/apt/preferences.d/firefox-no-snap /etc/apt/preferences.d/firefox-no-snap -RUN \ - echo "**** add icon ****" && \ - curl -o \ - /kclient/public/icon.png \ - https://rawcdn.githack.com/xpipe-io/xpipe/a097ae7a41131fa358b5343345557ad00a45c309/dist/logo/logo.png - RUN echo "**** install packages ****" && \ add-apt-repository -y ppa:mozillateam/ppa && \ apt-get update && \ @@ -75,6 +63,12 @@ COPY /root / # ports and volumes VOLUME /config +RUN \ + echo "**** add icon ****" && \ + curl -o \ + /kclient/public/icon.png \ + https://rawcdn.githack.com/xpipe-io/xpipe/a097ae7a41131fa358b5343345557ad00a45c309/dist/logo/logo.png + RUN echo "**** XPipe ****" && \ wget "https://github.com/$XPIPE_REPOSITORY/releases/download/$XPIPE_VERSION/xpipe-installer-linux-x86_64.deb" && \ DEBIAN_FRONTEND=noninteractive \ diff --git a/README.md b/README.md index 03559df..522ba27 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,98 @@ # XPipe Webtop -This docker image is a fork of https://github.com/linuxserver/docker-webtop that comes with XPipe and various terminals and editors preinstalled. \ No newline at end of file +This docker image is a fork of https://github.com/linuxserver/docker-webtop that comes with XPipe and various terminals and editors preinstalled. + +## Application Setup + +The Webtop can be accessed at: + +* https://yourhost:3001/ + +### Options in all KasmVNC based GUI containers + +This container is based on [Docker Baseimage KasmVNC](https://github.com/linuxserver/docker-baseimage-kasmvnc) which means there are additional environment variables and run configurations to enable or disable specific functionality. + +#### Optional environment variables + +| Variable | Description | +| :----: | --- | +| CUSTOM_USER | HTTP Basic auth username, abc is default. | +| PASSWORD | HTTP Basic auth password, abc is default. If unset there will be no auth | +| SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` | + +## Usage + +To help you get started creating a container from this image you can either use docker-compose or the docker cli. + +### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose)) + +```yaml +--- +services: + webtop: + image: lscr.io/linuxserver/webtop:latest + container_name: webtop + security_opt: + - seccomp:unconfined #optional + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + - SUBFOLDER=/ #optional + - TITLE=Webtop #optional + volumes: + - /path/to/data:/config + - /var/run/docker.sock:/var/run/docker.sock #optional + ports: + - 3000:3000 + - 3001:3001 + devices: + - /dev/dri:/dev/dri #optional + shm_size: "1gb" #optional + restart: unless-stopped +``` + +### docker cli ([click here for more info](https://docs.docker.com/engine/reference/commandline/cli/)) + +```bash +docker run -d \ + --name=webtop \ + --security-opt seccomp=unconfined `#optional` \ + -e PUID=1000 \ + -e PGID=1000 \ + -e TZ=Etc/UTC \ + -e SUBFOLDER=/ `#optional` \ + -e TITLE=Webtop `#optional` \ + -p 3000:3000 \ + -p 3001:3001 \ + -v /path/to/data:/config \ + -v /var/run/docker.sock:/var/run/docker.sock `#optional` \ + --device /dev/dri:/dev/dri `#optional` \ + --shm-size="1gb" `#optional` \ + --restart unless-stopped \ + lscr.io/linuxserver/webtop:latest +``` + +## Parameters + +Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `:` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container. + +| Parameter | Function | +| :----: | --- | +| `-p 3001` | Web Desktop GUI HTTPS | +| `-e SUBFOLDER=/` | Specify a subfolder to use with reverse proxies, IE `/subfolder/` | +| `-v /config` | abc users home directory | +| `-v /var/run/docker.sock` | Docker Socket on the system, if you want to use Docker in the container | + +## Building locally + +If you want to make local modifications to these images for development purposes or just to customize the logic: + +```bash +git clone https://github.com/linuxserver/docker-webtop.git +cd docker-webtop +docker build \ + --no-cache \ + --pull \ + -t lscr.io/linuxserver/webtop:latest . +```