├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug-report.yml │ ├── config.yml │ └── feature-request.yml └── workflows │ └── build-image.yml ├── DOCKERHUB.md ├── Dockerfile ├── LICENSE ├── README.md ├── appdefs.yml ├── rootfs ├── defaults │ ├── Trolltech.conf │ └── tsMuxeR.conf ├── etc │ └── cont-init.d │ │ └── 55-tsmuxer.sh └── startapp.sh └── src └── tsmuxer └── build.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: jlesage 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ["https://paypal.me/JocelynLeSage", "https://www.tesla.com/referral/jocelyn4590"] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.yml: -------------------------------------------------------------------------------- 1 | name: Bug report 2 | description: File a bug report. 3 | title: "[Bug] Provide a short description of the bug here" 4 | labels: ["bug"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to fill out this bug report! 10 | - type: textarea 11 | attributes: 12 | label: Current Behavior 13 | description: A concise description of what you're experiencing. 14 | validations: 15 | required: true 16 | - type: textarea 17 | attributes: 18 | label: Expected Behavior 19 | description: A concise description of what you expected to happen. 20 | validations: 21 | required: false 22 | - type: textarea 23 | attributes: 24 | label: Steps To Reproduce 25 | description: Steps to reproduce the behavior. 26 | validations: 27 | required: false 28 | - type: textarea 29 | attributes: 30 | label: Environment 31 | description: | 32 | Provide details about the host running the container. 33 | Examples: 34 | - Operating system (e.g. Ubuntu, Windows, TrueNAS, openmediavault, unRAID, etc). 35 | - Version of the operating system. 36 | - CPU architecture (x86-64, arm, arm64, etc). 37 | - Model of the device, if applicable (e.g. Raspberry Pi 4B, Synology DS418, QNAP TS-364, etc). 38 | - The Docker version (output of `docker version`). 39 | - Anything else specific to your environment. Examples: 40 | - Network share (NFS, CIFS) mapped to the container. 41 | - Docker running in LXC container. 42 | - etc. 43 | - If applicable, how the UI provided by the container is access: 44 | - Browser (Chrome, Firefox, Edge, etc). 45 | - Version of the browser. 46 | - OS of the browser. 47 | - Is the container accessed through a reverse proxy. 48 | - etc. 49 | value: | 50 | - OS: 51 | - OS version: 52 | - CPU: 53 | - Docker version: 54 | - Device model: 55 | - Browser/OS: 56 | validations: 57 | required: false 58 | - type: textarea 59 | attributes: 60 | label: Container creation 61 | description: | 62 | How did you create the container ? 63 | Examples: 64 | - The `docker run` command used. 65 | - The compose file used. 66 | - Screenshots of the management tool UI (e.g. Portainer, unRAID, etc) showing container settings. 67 | validations: 68 | required: true 69 | - type: textarea 70 | attributes: 71 | label: Container log 72 | description: Please copy/paste the output of `docker logs `. 73 | render: text 74 | validations: 75 | required: true 76 | - type: textarea 77 | attributes: 78 | label: Container inspect 79 | description: | 80 | If the container is running, please provide the output of `docker inspect `. 81 | **Attention**: If you defined passwords, secrets or any sensitive information via environment variables, make sure to remove them from the output. 82 | render: text 83 | validations: 84 | required: false 85 | - type: textarea 86 | attributes: 87 | label: Anything else? 88 | description: | 89 | Anything that will give more context about the issue you are encountering. 90 | 91 | Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. 92 | validations: 93 | required: false 94 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Ask a question, discuss 4 | url: https://github.com/jlesage/docker-tsmuxer/discussions 5 | about: Get help using this Docker container. 6 | - name: Documentation 7 | url: https://github.com/jlesage/docker-tsmuxer#readme 8 | about: Documentation about this Docker container. 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea for this project. 3 | title: "[Feature request] Provide a short description of the feature here" 4 | labels: ["enhancement"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thank you for suggesting an idea to make this project better. 10 | - type: textarea 11 | attributes: 12 | label: Idea 13 | description: | 14 | Please describe the desired behavior, pitch your idea, or suggest improvements. 15 | validations: 16 | required: true 17 | -------------------------------------------------------------------------------- /.github/workflows/build-image.yml: -------------------------------------------------------------------------------- 1 | name: Docker image CI/CD 2 | 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | 7 | env: 8 | DOCKER_IMAGE_NAME: jlesage/tsmuxer 9 | PLATFORMS: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8 10 | 11 | on: 12 | push: 13 | branches: '*' 14 | tags: 15 | - v[0-9][0-9].[0-9][0-9].[0-9]+ 16 | - v[0-9][0-9].[0-9][0-9].[0-9]+-pre.[0-9]+ 17 | pull_request: 18 | 19 | jobs: 20 | build: 21 | name: Build image 22 | runs-on: ubuntu-22.04 23 | 24 | steps: 25 | - name: Free disk space 26 | uses: jlumbroso/free-disk-space@main 27 | with: 28 | tool-cache: true 29 | android: true 30 | dotnet: true 31 | haskell: true 32 | large-packages: true 33 | docker-images: true 34 | swap-storage: false 35 | 36 | - name: Prepare 37 | id: prep 38 | run: | 39 | # Determine the Docker container version. 40 | VERSION=unknown 41 | if [[ $GITHUB_REF =~ refs/tags/* ]]; then 42 | # Git tag pushed: use tag as the version. 43 | VERSION=${GITHUB_REF#refs/tags/} 44 | elif [[ $GITHUB_REF =~ refs/heads/* ]]; then 45 | # Git commit pushed: use the commit SHA as the version. 46 | VERSION=${GITHUB_SHA::8} 47 | elif [[ $GITHUB_REF =~ refs/pull/* ]]; then 48 | # Pull request: use PR number as the version. 49 | VERSION=pr-${{ github.event.number }} 50 | else 51 | echo "::error::Unexpected GITHUB_REF: $GITHUB_REF" 52 | exit 1 53 | fi 54 | # Determine the version to put in container label. 55 | LABEL_VERSION=${VERSION} 56 | if [[ $GITHUB_REF =~ refs/tags/* ]]; then 57 | # Do not include the starting 'v' of the version. 58 | LABEL_VERSION=${VERSION:1} 59 | fi 60 | # Determine the Docker container tags. 61 | TAGS="${{ env.DOCKER_IMAGE_NAME }}:${VERSION}" 62 | if [[ $GITHUB_REF =~ refs/tags/* ]]; then 63 | TAGS="$TAGS,${{ env.DOCKER_IMAGE_NAME }}:latest" 64 | fi 65 | TAGS="$TAGS,$(echo $TAGS | tr ',' '\n' | sed 's|^|ghcr.io/|' | tr '\n' ',')" 66 | # Determine the release type. 67 | if [[ $GITHUB_REF =~ refs/tags/* ]]; then 68 | IS_RELEASE=yes 69 | if [[ $GITHUB_REF =~ -pre\.[0-9]+ ]]; then 70 | RELEASE_TYPE="pre" 71 | else 72 | RELEASE_TYPE="standard" 73 | fi 74 | else 75 | IS_RELEASE=no 76 | RELEASE_TYPE="n/a" 77 | fi 78 | # Print results. 79 | echo "::group::Results" 80 | echo "Github reference: $GITHUB_REF" 81 | echo "Release: $IS_RELEASE" 82 | echo "Release type: $RELEASE_TYPE" 83 | echo "Docker container version: $VERSION" 84 | echo "Docker container version label: $LABEL_VERSION" 85 | echo "Docker container tag(s): $TAGS" 86 | echo "::endgroup::" 87 | # Export outputs. 88 | echo "is_release=${IS_RELEASE}" >> $GITHUB_OUTPUT 89 | echo "release_type=${RELEASE_TYPE}" >> $GITHUB_OUTPUT 90 | echo "version=${VERSION}" >> $GITHUB_OUTPUT 91 | echo "label_version=${LABEL_VERSION}" >> $GITHUB_OUTPUT 92 | echo "tags=${TAGS}" >> $GITHUB_OUTPUT 93 | #echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT 94 | 95 | - name: Setup QEMU 96 | uses: docker/setup-qemu-action@v3 97 | with: 98 | platforms: arm,arm64,ppc64le,mips64,s390x 99 | 100 | - name: Setup Docker Buildx 101 | uses: docker/setup-buildx-action@v3 102 | 103 | - name: Login to DockerHub 104 | if: ${{ steps.prep.outputs.is_release == 'yes' }} 105 | uses: docker/login-action@v3 106 | with: 107 | username: ${{ secrets.DOCKERHUB_USERNAME }} 108 | password: ${{ secrets.DOCKERHUB_PASSWORD }} 109 | 110 | - name: Login to GitHub Container Registry 111 | if: ${{ steps.prep.outputs.is_release == 'yes' }} 112 | uses: docker/login-action@v3 113 | with: 114 | registry: ghcr.io 115 | username: ${{ github.repository_owner }} 116 | password: ${{ secrets.GITHUB_TOKEN }} 117 | 118 | - name: Build and push 119 | uses: docker/build-push-action@v6 120 | with: 121 | push: ${{ steps.prep.outputs.is_release == 'yes' }} 122 | provenance: false 123 | platforms: ${{ env.PLATFORMS }} 124 | tags: ${{ steps.prep.outputs.tags }} 125 | build-args: | 126 | DOCKER_IMAGE_VERSION=${{ steps.prep.outputs.label_version }} 127 | cache-from: type=gha,scope=${{ env.DOCKER_IMAGE_NAME }} 128 | cache-to: type=gha,mode=max,scope=${{ env.DOCKER_IMAGE_NAME }} 129 | 130 | - name: Inspect 131 | if: ${{ steps.prep.outputs.is_release == 'yes' }} 132 | run: | 133 | docker buildx imagetools inspect ${{ env.DOCKER_IMAGE_NAME }}:${{ steps.prep.outputs.version }} 134 | 135 | - name: Checkout 136 | uses: actions/checkout@v4 137 | if: ${{ steps.prep.outputs.release_type == 'standard' }} 138 | 139 | - name: Dockerhub description 140 | if: ${{ steps.prep.outputs.release_type == 'standard' }} 141 | uses: peter-evans/dockerhub-description@v4 142 | with: 143 | username: ${{ secrets.DOCKERHUB_USERNAME }} 144 | password: ${{ secrets.DOCKERHUB_PASSWORD }} 145 | repository: ${{ env.DOCKER_IMAGE_NAME }} 146 | readme-filepath: DOCKERHUB.md 147 | 148 | notification: 149 | name: Notification 150 | needs: [ build ] 151 | runs-on: ubuntu-22.04 152 | if: ${{ always() && github.event_name != 'pull_request' }} 153 | 154 | steps: 155 | - name: Pushover notification 156 | uses: desiderati/github-action-pushover@v1 157 | with: 158 | job-status: ${{ needs.build.result }} 159 | pushover-api-token: ${{ secrets.PUSHOVER_API_TOKEN }} 160 | pushover-user-key: ${{ secrets.PUSHOVER_USER_KEY }} 161 | -------------------------------------------------------------------------------- /DOCKERHUB.md: -------------------------------------------------------------------------------- 1 | # Docker container for tsMuxeR 2 | [![Release](https://img.shields.io/github/release/jlesage/docker-tsmuxer.svg?logo=github&style=for-the-badge)](https://github.com/jlesage/docker-tsmuxer/releases/latest) 3 | [![Docker Image Size](https://img.shields.io/docker/image-size/jlesage/tsmuxer/latest?logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/tsmuxer/tags) 4 | [![Docker Pulls](https://img.shields.io/docker/pulls/jlesage/tsmuxer?label=Pulls&logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/tsmuxer) 5 | [![Docker Stars](https://img.shields.io/docker/stars/jlesage/tsmuxer?label=Stars&logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/tsmuxer) 6 | [![Build Status](https://img.shields.io/github/actions/workflow/status/jlesage/docker-tsmuxer/build-image.yml?logo=github&branch=master&style=for-the-badge)](https://github.com/jlesage/docker-tsmuxer/actions/workflows/build-image.yml) 7 | [![Source](https://img.shields.io/badge/Source-GitHub-blue?logo=github&style=for-the-badge)](https://github.com/jlesage/docker-tsmuxer) 8 | [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=for-the-badge)](https://paypal.me/JocelynLeSage) 9 | 10 | This is a Docker container for [tsMuxeR](https://github.com/justdan96/tsMuxer). 11 | 12 | The graphical user interface (GUI) of the application can be accessed through a 13 | modern web browser, requiring no installation or configuration on the client 14 | 15 | --- 16 | 17 | [![tsMuxeR logo](https://images.weserv.nl/?url=raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/tsmuxer-icon.png&w=110)](https://github.com/justdan96/tsMuxer)[![tsMuxeR](https://images.placeholders.dev/?width=224&height=110&fontFamily=monospace&fontWeight=400&fontSize=52&text=tsMuxeR&bgColor=rgba(0,0,0,0.0)&textColor=rgba(121,121,121,1))](https://github.com/justdan96/tsMuxer) 18 | 19 | tsMuxer is a Transport Stream muxer. Remux/mux elementary streams, EVO/VOB/MPG, 20 | MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264, VC-1, 21 | MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD. Ability to set 22 | muxing fps manually and automatically, change level for H.264 streams, shift 23 | sound tracks, extract DTS core from DTS-HD, join files. Output/author to 24 | compliant Blu-ray Disc or AVCHD. Blu-ray 3D support. 25 | 26 | --- 27 | 28 | ## Quick Start 29 | 30 | **NOTE**: 31 | The Docker command provided in this quick start is an example, and parameters 32 | should be adjusted to suit your needs. 33 | 34 | Launch the tsMuxeR docker container with the following command: 35 | ```shell 36 | docker run -d \ 37 | --name=tsmuxer \ 38 | -p 5800:5800 \ 39 | -v /docker/appdata/tsmuxer:/config:rw \ 40 | -v /home/user:/storage:rw \ 41 | jlesage/tsmuxer 42 | ``` 43 | 44 | Where: 45 | 46 | - `/docker/appdata/tsmuxer`: Stores the application's configuration, state, logs, and any files requiring persistency. 47 | - `/home/user`: Contains files from the host that need to be accessible to the application. 48 | 49 | Access the tsMuxeR GUI by browsing to `http://your-host-ip:5800`. 50 | Files from the host appear under the `/storage` folder in the container. 51 | 52 | ## Documentation 53 | 54 | Full documentation is available at https://github.com/jlesage/docker-tsmuxer. 55 | 56 | ## Support or Contact 57 | 58 | Having troubles with the container or have questions? Please 59 | [create a new issue](https://github.com/jlesage/docker-tsmuxer/issues). 60 | 61 | For other Dockerized applications, visit https://jlesage.github.io/docker-apps. 62 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # tsmuxer Dockerfile 3 | # 4 | # https://github.com/jlesage/docker-tsmuxer 5 | # 6 | 7 | # Docker image version is provided via build arg. 8 | ARG DOCKER_IMAGE_VERSION= 9 | 10 | # Define software versions. 11 | ARG TSMUXER_VERSION=2.7.0 12 | 13 | # Define software download URLs. 14 | ARG TSMUXER_URL=https://github.com/justdan96/tsMuxer/archive/refs/tags/${TSMUXER_VERSION}.tar.gz 15 | 16 | # Get Dockerfile cross-compilation helpers. 17 | FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx 18 | 19 | # Build tsMuxeR. 20 | FROM --platform=$BUILDPLATFORM alpine:3.20 AS tsmuxer 21 | ARG TARGETPLATFORM 22 | ARG TSMUXER_VERSION 23 | ARG TSMUXER_URL 24 | COPY --from=xx / / 25 | COPY src/tsmuxer /build 26 | RUN /build/build.sh "$TSMUXER_VERSION" "$TSMUXER_URL" 27 | RUN xx-verify \ 28 | /tmp/tsmuxer-install/usr/bin/tsmuxer \ 29 | /tmp/tsmuxer-install/usr/bin/tsMuxerGUI 30 | 31 | # Pull base image. 32 | FROM jlesage/baseimage-gui:alpine-3.20-v4.9.0 33 | 34 | ARG TSMUXER_VERSION 35 | ARG DOCKER_IMAGE_VERSION 36 | 37 | # Define working directory. 38 | WORKDIR /tmp 39 | 40 | # Install dependencies. 41 | RUN add-pkg \ 42 | qt5-qtbase-x11 \ 43 | qt5-qtmultimedia \ 44 | adwaita-qt \ 45 | # A font is needed. 46 | font-croscore 47 | 48 | # Generate and install favicons. 49 | RUN \ 50 | APP_ICON_URL=https://raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/tsmuxer-icon.png && \ 51 | install_app_icon.sh "$APP_ICON_URL" 52 | 53 | # Add files. 54 | COPY rootfs/ / 55 | COPY --from=tsmuxer /tmp/tsmuxer-install/usr/bin/tsmuxer /usr/bin/ 56 | COPY --from=tsmuxer /tmp/tsmuxer-install/usr/bin/tsMuxerGUI /usr/bin/ 57 | 58 | # Set internal environment variables. 59 | RUN \ 60 | set-cont-env APP_NAME "tsMuxeR" && \ 61 | set-cont-env APP_VERSION "$TSMUXER_VERSION" && \ 62 | set-cont-env DOCKER_IMAGE_VERSION "$DOCKER_IMAGE_VERSION" && \ 63 | true 64 | 65 | # Define mountable directories. 66 | VOLUME ["/storage"] 67 | 68 | # Metadata. 69 | LABEL \ 70 | org.label-schema.name="tsmuxer" \ 71 | org.label-schema.description="Docker container for tsMuxeR" \ 72 | org.label-schema.version="${DOCKER_IMAGE_VERSION:-unknown}" \ 73 | org.label-schema.vcs-url="https://github.com/jlesage/docker-tsmuxer" \ 74 | org.label-schema.schema-version="1.0" 75 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Jocelyn Le Sage 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker container for tsMuxeR 2 | [![Release](https://img.shields.io/github/release/jlesage/docker-tsmuxer.svg?logo=github&style=for-the-badge)](https://github.com/jlesage/docker-tsmuxer/releases/latest) 3 | [![Docker Image Size](https://img.shields.io/docker/image-size/jlesage/tsmuxer/latest?logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/tsmuxer/tags) 4 | [![Docker Pulls](https://img.shields.io/docker/pulls/jlesage/tsmuxer?label=Pulls&logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/tsmuxer) 5 | [![Docker Stars](https://img.shields.io/docker/stars/jlesage/tsmuxer?label=Stars&logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/tsmuxer) 6 | [![Build Status](https://img.shields.io/github/actions/workflow/status/jlesage/docker-tsmuxer/build-image.yml?logo=github&branch=master&style=for-the-badge)](https://github.com/jlesage/docker-tsmuxer/actions/workflows/build-image.yml) 7 | [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=for-the-badge)](https://paypal.me/JocelynLeSage) 8 | 9 | This project provides a Docker container for [tsMuxeR](https://github.com/justdan96/tsMuxer). 10 | 11 | The graphical user interface (GUI) of the application can be accessed through a 12 | modern web browser, requiring no installation or configuration on the client 13 | side, or via any VNC client. 14 | 15 | --- 16 | 17 | [![tsMuxeR logo](https://images.weserv.nl/?url=raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/tsmuxer-icon.png&w=110)](https://github.com/justdan96/tsMuxer)[![tsMuxeR](https://images.placeholders.dev/?width=224&height=110&fontFamily=monospace&fontWeight=400&fontSize=52&text=tsMuxeR&bgColor=rgba(0,0,0,0.0)&textColor=rgba(121,121,121,1))](https://github.com/justdan96/tsMuxer) 18 | 19 | tsMuxer is a Transport Stream muxer. Remux/mux elementary streams, EVO/VOB/MPG, 20 | MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264, VC-1, 21 | MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD. Ability to set 22 | muxing fps manually and automatically, change level for H.264 streams, shift 23 | sound tracks, extract DTS core from DTS-HD, join files. Output/author to 24 | compliant Blu-ray Disc or AVCHD. Blu-ray 3D support. 25 | 26 | --- 27 | 28 | ## Table of Contents 29 | 30 | * [Quick Start](#quick-start) 31 | * [Usage](#usage) 32 | * [Environment Variables](#environment-variables) 33 | * [Deployment Considerations](#deployment-considerations) 34 | * [Data Volumes](#data-volumes) 35 | * [Ports](#ports) 36 | * [Changing Parameters of a Running Container](#changing-parameters-of-a-running-container) 37 | * [Docker Compose File](#docker-compose-file) 38 | * [Docker Image Versioning and Tags](#docker-image-versioning-and-tags) 39 | * [Docker Image Update](#docker-image-update) 40 | * [Synology](#synology) 41 | * [unRAID](#unraid) 42 | * [User/Group IDs](#usergroup-ids) 43 | * [Accessing the GUI](#accessing-the-gui) 44 | * [Security](#security) 45 | * [SSVNC](#ssvnc) 46 | * [Certificates](#certificates) 47 | * [VNC Password](#vnc-password) 48 | * [Web Authentication](#web-authentication) 49 | * [Configuring Users Credentials](#configuring-users-credentials) 50 | * [Reverse Proxy](#reverse-proxy) 51 | * [Routing Based on Hostname](#routing-based-on-hostname) 52 | * [Routing Based on URL Path](#routing-based-on-url-path) 53 | * [Web Audio](#web-audio) 54 | * [Web File Manager](#web-file-manager) 55 | * [Shell Access](#shell-access) 56 | * [Support or Contact](#support-or-contact) 57 | 58 | ## Quick Start 59 | 60 | > [!IMPORTANT] 61 | > The Docker command provided in this quick start is an example, and parameters 62 | > should be adjusted to suit your needs. 63 | 64 | Launch the tsMuxeR docker container with the following command: 65 | 66 | ```shell 67 | docker run -d \ 68 | --name=tsmuxer \ 69 | -p 5800:5800 \ 70 | -v /docker/appdata/tsmuxer:/config:rw \ 71 | -v /home/user:/storage:rw \ 72 | jlesage/tsmuxer 73 | ``` 74 | 75 | Where: 76 | 77 | - `/docker/appdata/tsmuxer`: Stores the application's configuration, state, logs, and any files requiring persistency. 78 | - `/home/user`: Contains files from the host that need to be accessible to the application. 79 | 80 | Access the tsMuxeR GUI by browsing to `http://your-host-ip:5800`. 81 | Files from the host appear under the `/storage` folder in the container. 82 | 83 | ## Usage 84 | 85 | ```shell 86 | docker run [-d] \ 87 | --name=tsmuxer \ 88 | [-e =]... \ 89 | [-v :[:PERMISSIONS]]... \ 90 | [-p :]... \ 91 | jlesage/tsmuxer 92 | ``` 93 | 94 | | Parameter | Description | 95 | |-----------|-------------| 96 | | -d | Runs the container in the background. If not set, the container runs in the foreground. | 97 | | -e | Passes an environment variable to the container. See [Environment Variables](#environment-variables) for details. | 98 | | -v | Sets a volume mapping to share a folder or file between the host and the container. See [Data Volumes](#data-volumes) for details. | 99 | | -p | Sets a network port mapping to expose an internal container port to the host). See [Ports](#ports) for details. | 100 | 101 | ### Environment Variables 102 | 103 | To customize the container's behavior, you can pass environment variables using 104 | the `-e` parameter in the format `=`. 105 | 106 | | Variable | Description | Default | 107 | |----------------|----------------------------------------------|---------| 108 | |`USER_ID`| ID of the user the application runs as. See [User/Group IDs](#usergroup-ids) for details. | `1000` | 109 | |`GROUP_ID`| ID of the group the application runs as. See [User/Group IDs](#usergroup-ids) for details. | `1000` | 110 | |`SUP_GROUP_IDS`| Comma-separated list of supplementary group IDs for the application. | (no value) | 111 | |`UMASK`| Mask controlling permissions for newly created files and folders, specified in octal notation. By default, `0022` ensures files and folders are readable by all but writable only by the owner. See the umask calculator at http://wintelguy.com/umask-calc.pl. | `0022` | 112 | |`LANG`| Sets the [locale](https://en.wikipedia.org/wiki/Locale_(computer_software)), defining the application's language, if supported. Format is `language[_territory][.codeset]`, where language is an [ISO 639 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), territory is an [ISO 3166 country code](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes), and codeset is a character set, like `UTF-8`. For example, Australian English using UTF-8 is `en_AU.UTF-8`. | `en_US.UTF-8` | 113 | |`TZ`| [TimeZone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used by the container. The timezone can also be set by mapping `/etc/localtime` between the host and the container. | `Etc/UTC` | 114 | |`KEEP_APP_RUNNING`| When set to `1`, the application is automatically restarted if it crashes or terminates. | `0` | 115 | |`APP_NICENESS`| Priority at which the application runs. A niceness value of -20 is the highest, 19 is the lowest and 0 the default. **NOTE**: A negative niceness (priority increase) requires additional permissions. The container must be run with the Docker option `--cap-add=SYS_NICE`. | `0` | 116 | |`INSTALL_PACKAGES`| Space-separated list of packages to install during container startup. List of available packages can be found at https://pkgs.alpinelinux.org. | (no value) | 117 | |`PACKAGES_MIRROR`| Mirror of the repository to use when installing packages. List of mirrors is available at https://mirrors.alpinelinux.org. | (no value) | 118 | |`CONTAINER_DEBUG`| When set to `1`, enables debug logging. | `0` | 119 | |`DISPLAY_WIDTH`| Width (in pixels) of the application's window. | `1920` | 120 | |`DISPLAY_HEIGHT`| Height (in pixels) of the application's window. | `1080` | 121 | |`DARK_MODE`| When set to `1`, enables dark mode for the application. See Dark Mode](#dark-mode) for details. | `0` | 122 | |`WEB_AUDIO`| When set to `1`, enables audio support, allowing audio produced by the application to play through the browser. See [Web Audio](#web-audio) for details. | `0` | 123 | |`WEB_FILE_MANAGER`| When set to `1`, enables the web file manager, allowing interaction with files inside the container through the web browser, supporting operations like renaming, deleting, uploading, and downloading. See [Web File Manager](#web-file-manager) for details. | `0` | 124 | |`WEB_FILE_MANAGER_ALLOWED_PATHS`| Comma-separated list of paths within the container that the file manager can access. By default, the container's entire filesystem is not accessible, and this variable specifies allowed paths. If set to `AUTO`, commonly used folders and those mapped to the container are automatically allowed. The value `ALL` allows access to all paths (no restrictions). See [Web File Manager](#web-file-manager) for details. | `AUTO` | 125 | |`WEB_FILE_MANAGER_DENIED_PATHS`| Comma-separated list of paths within the container that the file manager cannot access. A denied path takes precedence over an allowed path. See [Web File Manager](#web-file-manager) for details. | (no value) | 126 | |`WEB_AUTHENTICATION`| When set to `1`, protects the application's GUI with a login page when accessed via a web browser. Access is granted only with valid credentials. This feature requires the secure connection to be enabled. See [Web Authentication](#web-authentication) for details. | `0` | 127 | |`WEB_AUTHENTICATION_TOKEN_VALIDITY_TIME`| Lifetime of a token, in hours. A token is assigned to the user after successful login. As long as the token is valid, the user can access the application's GUI without logging in again. Once the token expires, the login page is displayed again. | `24` | 128 | |`WEB_AUTHENTICATION_USERNAME`| Optional username for web authentication. Provides a quick and easy way to configure credentials for a single user. For more secure configuration or multiple users, see the [Web Authentication](#web-authentication) section. | (no value) | 129 | |`WEB_AUTHENTICATION_PASSWORD`| Optional password for web authentication. Provides a quick and easy way to configure credentials for a single user. For more secure configuration or multiple users, see the [Web Authentication](#web-authentication) section. | (no value) | 130 | |`SECURE_CONNECTION`| When set to `1`, uses an encrypted connection to access the application's GUI (via web browser or VNC client). See [Security](#security) for details. | `0` | 131 | |`SECURE_CONNECTION_VNC_METHOD`| Method used for encrypted VNC connections. Possible values are `SSL` or `TLS`. See [Security](#security) for details. | `SSL` | 132 | |`SECURE_CONNECTION_CERTS_CHECK_INTERVAL`| Interval, in seconds, at which the system checks if web or VNC certificates have changed. When a change is detected, affected services are automatically restarted. A value of `0` disables the check. | `60` | 133 | |`WEB_LISTENING_PORT`| Port used by the web server to serve the application's GUI. This port is internal to the container and typically does not need to be changed. By default, a container uses the default bridge network, requiring each internal port to be mapped to an external port (using the `-p` or `--publish` argument). If another network type is used, changing this port may prevent conflicts with other services/containers. **NOTE**: A value of `-1` disables HTTP/HTTPS access to the application's GUI. | `5800` | 134 | |`VNC_LISTENING_PORT`| Port used by the VNC server to serve the application's GUI. This port is internal to the container and typically does not need to be changed. By default, a container uses the default bridge network, requiring each internal port to be mapped to an external port (using the `-p` or `--publish` argument). If another network type is used, changing this port may prevent conflicts with other services/containers. **NOTE**: A value of `-1` disables VNC access to the application's GUI. | `5900` | 135 | |`VNC_PASSWORD`| Password required to connect to the application's GUI. See the [VNC Password](#vnc-password) section for details. | (no value) | 136 | |`ENABLE_CJK_FONT`| When set to `1`, installs the open-source font `WenQuanYi Zen Hei`, supporting a wide range of Chinese/Japanese/Korean characters. | `0` | 137 | 138 | #### Deployment Considerations 139 | 140 | Many tools used to manage Docker containers extract environment variables 141 | defined by the Docker image to create or deploy the container. 142 | 143 | For example, this behavior is seen in: 144 | - The Docker application on Synology NAS 145 | - The Container Station on QNAP NAS 146 | - Portainer 147 | - etc. 148 | 149 | While this is useful for users to adjust environment variable values to suit 150 | their needs, keeping all of them can be confusing and even risky. 151 | 152 | A good practice is to set or retain only the variables necessary for the 153 | container to function as desired in your setup. If a variable is left at its 154 | default value, it can be removed. Keep in mind that all environment variables 155 | are optional; none are required for the container to start. 156 | 157 | Removing unneeded environment variables offers several benefits: 158 | 159 | - Prevents retaining variables no longer used by the container. Over time, 160 | with image updates, some variables may become obsolete. 161 | - Allows the Docker image to update or fix default values. With image updates, 162 | default values may change to address issues or support new features. 163 | - Avoids changes to variables that could disrupt the container's 164 | functionality. Some undocumented variables, like `PATH` or `ENV`, are 165 | required but not meant to be modified by users, yet container management 166 | tools may expose them. 167 | - Addresses a bug in Container Station on QNAP and the Docker application on 168 | Synology, where variables without values may not be allowed. This behavior 169 | is incorrect, as variables without values are valid. Removing unneeded 170 | variables prevents deployment issues on these devices. 171 | 172 | ### Data Volumes 173 | 174 | The following table describes the data volumes used by the container. Volume 175 | mappings are set using the `-v` parameter with a value in the format 176 | `:[:PERMISSIONS]`. 177 | 178 | | Container path | Permissions | Description | 179 | |-----------------|-------------|-------------| 180 | |`/config`| rw | Stores the application's configuration, state, logs, and any files requiring persistency. | 181 | |`/storage`| rw | Contains files from the host that need to be accessible to the application. | 182 | 183 | ### Ports 184 | 185 | The following table lists the ports used by the container. 186 | 187 | When using the default bridge network, ports can be mapped to the host using the 188 | `-p` parameter with value in the format `:`. The 189 | internal container port may not be changeable, but you can use any port on the 190 | host side. 191 | 192 | See the Docker [Docker Container Networking](https://docs.docker.com/config/containers/container-networking) 193 | documentation for details. 194 | 195 | | Port | Protocol | Mapping to Host | Description | 196 | |------|----------|-----------------|-------------| 197 | | 5800 | TCP | Optional | Port to access the application's GUI via the web interface. Mapping to the host is optional if web access is not needed. For non-default bridge networks, the port can be changed with the `WEB_LISTENING_PORT` environment variable. | 198 | | 5900 | TCP | Optional | Port to access the application's GUI via the VNC protocol. Mapping to the host is optional if VNC access is not needed. For non-default bridge networks, the port can be changed with the `VNC_LISTENING_PORT` environment variable. | 199 | 200 | ### Changing Parameters of a Running Container 201 | 202 | Environment variables, volume mappings, and port mappings are specified when 203 | creating the container. To modify these parameters for an existing container, 204 | follow these steps: 205 | 206 | 1. Stop the container (if it is running): 207 | ```shell 208 | docker stop tsmuxer 209 | ``` 210 | 211 | 2. Remove the container: 212 | ```shell 213 | docker rm tsmuxer 214 | ``` 215 | 216 | 3. Recreate and start the container using the `docker run` command, adjusting 217 | parameters as needed. 218 | 219 | > [!NOTE] 220 | > Since all application data is saved under the `/config` container folder, 221 | > destroying and recreating the container does not result in data loss, and the 222 | > application resumes with the same state, provided the `/config` folder 223 | > mapping remains unchanged. 224 | 225 | ### Docker Compose File 226 | 227 | Below is an example `docker-compose.yml` file for use with 228 | [Docker Compose](https://docs.docker.com/compose/overview/). 229 | 230 | Adjust the configuration to suit your needs. Only mandatory settings are 231 | included in this example. 232 | 233 | ```yaml 234 | version: '3' 235 | services: 236 | tsmuxer: 237 | image: jlesage/tsmuxer 238 | ports: 239 | - "5800:5800" 240 | volumes: 241 | - "/docker/appdata/tsmuxer:/config:rw" 242 | - "/home/user:/storage:rw" 243 | ``` 244 | 245 | ## Docker Image Versioning and Tags 246 | 247 | Each release of a Docker image is versioned, and each version as its own image 248 | tag. Before October 2022, the versioning scheme followed 249 | [semantic versioning](https://semver.org). 250 | 251 | Since then, the versioning scheme has shifted to 252 | [calendar versioning](https://calver.org) with the format `YY.MM.SEQUENCE`, 253 | where: 254 | - `YY` is the zero-padded year (relative to year 2000). 255 | - `MM` is the zero-padded month. 256 | - `SEQUENCE` is the incremental release number within the month (first release 257 | is 1, second is 2, etc). 258 | 259 | View all available tags on [Docker Hub] or check the [Releases] page for version 260 | details. 261 | 262 | [Releases]: https://github.com/jlesage/docker-tsmuxer/releases 263 | [Docker Hub]: https://hub.docker.com/r/jlesage/tsmuxer/tags 264 | 265 | ## Docker Image Update 266 | 267 | The Docker image is regularly updated to incorporate new features, fix issues, 268 | or integrate newer versions of the containerized application. Several methods 269 | can be used to update the Docker image. 270 | 271 | If your system provides a built-in method for updating containers, this should 272 | be your primary approach. 273 | 274 | Alternatively, you can use [Watchtower], a container-based solution for 275 | automating Docker image updates. Watchtower seamlessly handles updates when a 276 | new image is available. 277 | 278 | To manually update the Docker image, follow these steps: 279 | 280 | 1. Fetch the latest image: 281 | ```shell 282 | docker pull jlesage/tsmuxer 283 | ``` 284 | 285 | 2. Stop the container: 286 | ```shell 287 | docker stop tsmuxer 288 | ``` 289 | 290 | 3. Remove the container: 291 | ```shell 292 | docker rm tsmuxer 293 | ``` 294 | 295 | 4. Recreate and start the container using the `docker run` command, with the 296 | same parameters used during initial deployment. 297 | 298 | [Watchtower]: https://github.com/containrrr/watchtower 299 | 300 | ### Synology 301 | 302 | For Synology NAS users, follow these steps to update a container image: 303 | 304 | 1. Open the *Docker* application. 305 | 2. Click *Registry* in the left pane. 306 | 3. In the search bar, type the name of the container (`jlesage/tsmuxer`). 307 | 4. Select the image, click *Download*, and choose the `latest` tag. 308 | 5. Wait for the download to complete. A notification will appear once done. 309 | 6. Click *Container* in the left pane. 310 | 7. Select your tsMuxeR container. 311 | 8. Stop it by clicking *Action* -> *Stop*. 312 | 9. Clear the container by clicking *Action* -> *Reset* (or *Action* -> 313 | *Clear* if you don't have the latest *Docker* application). This removes 314 | the container while keeping its configuration. 315 | 10. Start the container again by clicking *Action* -> *Start*. **NOTE**: The 316 | container may temporarily disappear from the list while it is recreated. 317 | 318 | ### unRAID 319 | 320 | For unRAID users, update a container image with these steps: 321 | 322 | 1. Select the *Docker* tab. 323 | 2. Click the *Check for Updates* button at the bottom of the page. 324 | 3. Click the *apply update* link of the container to be updated. 325 | 326 | ## User/Group IDs 327 | 328 | When mapping data volumes (using the `-v` flag of the `docker run` command), 329 | permission issues may arise between the host and the container. Files and 330 | folders in a data volume are owned by a user, which may differ from the user 331 | running the application. Depending on permissions, this could prevent the 332 | container from accessing the shared volume. 333 | 334 | To avoid this, specify the user the application should run as using the 335 | `USER_ID` and `GROUP_ID` environment variables. 336 | 337 | To find the appropriate IDs, run the following command on the host for the user 338 | owning the data volume: 339 | 340 | ```shell 341 | id 342 | ``` 343 | 344 | This produces output like: 345 | 346 | ``` 347 | uid=1000(myuser) gid=1000(myuser) groups=1000(myuser),4(adm),24(cdrom),27(sudo),46(plugdev),113(lpadmin) 348 | ``` 349 | 350 | Use the `uid` (user ID) and `gid` (group ID) values to configure the container. 351 | 352 | ## Accessing the GUI 353 | 354 | Assuming the container's ports are mapped to the same host's ports, access the 355 | application's GUI as follows: 356 | 357 | - Via a web browser: 358 | 359 | ```text 360 | http://:5800 361 | ``` 362 | 363 | - Via any VNC client: 364 | 365 | ```text 366 | :5900 367 | ``` 368 | 369 | ## Security 370 | 371 | By default, access to the application's GUI uses an unencrypted connection (HTTP 372 | or VNC). 373 | 374 | A secure connection can be enabled via the `SECURE_CONNECTION` environment 375 | variable. See the [Environment Variables](#environment-variables) section for 376 | details on configuring environment variables. 377 | 378 | When enabled, the GUI is accessed over HTTPS when using a browser, with all HTTP 379 | accesses redirected to HTTPS. 380 | 381 | For VNC clients, the connection can be secured using on of two methods, 382 | configured via the `SECURE_CONNECTION_VNC_METHOD` environment variable: 383 | 384 | - `SSL`: An SSL tunnel is used to transport the VNC connection. Few VNC 385 | clients supports this method; [SSVNC] is one that does. 386 | - `TLS`: A VNC security type negotiated during the VNC handshake. It uses TLS 387 | to establish a secure connection. Clients may optionally validate the 388 | server’s certificate. Valid certificates must be provided for this 389 | validation to succeed. See [Certificates](#certificates) for details. 390 | [TigerVNC] is a client that supports TLS encryption. 391 | 392 | [TigerVNC]: https://tigervnc.org 393 | 394 | ### SSVNC 395 | 396 | [SSVNC] is a VNC viewer that adds encryption to VNC connections by using an 397 | SSL tunnel to transport the VNC traffic. 398 | 399 | While the Linux version of [SSVNC] works well, the Windows version has issues. 400 | At the time of writing, the latest version `1.0.30` fails with the error: 401 | 402 | ```text 403 | ReadExact: Socket error while reading 404 | ``` 405 | 406 | For convenience, an unofficial, working version is provided here: 407 | 408 | https://github.com/jlesage/docker-baseimage-gui/raw/master/tools/ssvnc_windows_only-1.0.30-r1.zip 409 | 410 | This version upgrades the bundled `stunnel` to version `5.49`, resolving the 411 | connection issues. 412 | 413 | [SSVNC]: http://www.karlrunge.com/x11vnc/ssvnc.html 414 | 415 | ### Certificates 416 | 417 | The following certificate files are required by the container. If missing, 418 | self-signed certificates are generated and used. All files are PEM-encoded x509 419 | certificates. 420 | 421 | | Container Path | Purpose | Content | 422 | |---------------------------------|----------------------------|---------| 423 | |`/config/certs/vnc-server.pem` |VNC connection encryption. |VNC server's private key and certificate, bundled with any root and intermediate certificates.| 424 | |`/config/certs/web-privkey.pem` |HTTPS connection encryption.|Web server's private key.| 425 | |`/config/certs/web-fullchain.pem`|HTTPS connection encryption.|Web server's certificate, bundled with any root and intermediate certificates.| 426 | 427 | > [!TIP] 428 | > To avoid certificate validity warnings or errors in browsers or VNC clients, 429 | > provide your own valid certificates. 430 | 431 | > [!NOTE] 432 | > Certificate files are monitored, and relevant services are restarted when 433 | > changes are detected. 434 | 435 | ### VNC Password 436 | 437 | To restrict access to your application, set a password using one of two methods: 438 | - Via the `VNC_PASSWORD` environment variable. 439 | - Via a `.vncpass_clear` file at the root of the `/config` volume, containing 440 | the password in clear text. During container startup, the content is 441 | obfuscated and moved to `.vncpass`. 442 | 443 | The security of the VNC password depends on: 444 | - The communication channel (encrypted or unencrypted). 445 | - The security of host access. 446 | 447 | When using a VNC password, enable a secure connection to prevent sending the 448 | password in clear text over an unencrypted channel. 449 | 450 | Unauthorized users with sufficient host privileges can retrieve the password by: 451 | 452 | - Viewing the `VNC_PASSWORD` environment variable via `docker inspect`. By 453 | default, the `docker` command requires root access, but it can be configured 454 | to allow users in a specific group. 455 | - Decrypting the `/config/.vncpass` file, which requires root or `USER_ID` 456 | permissions. 457 | 458 | > [!CAUTION] 459 | > VNC password is limited to 8 characters. This limitation comes from the Remote 460 | > Framebuffer Protocol [RFC](https://tools.ietf.org/html/rfc6143) (see section 461 | > [7.2.2](https://tools.ietf.org/html/rfc6143#section-7.2.2)). 462 | 463 | ### Web Authentication 464 | 465 | Access to the application's GUI via a web browser can be protected with a login 466 | page. When enabled, users must provide valid credentials to gain access. 467 | 468 | Enable web authentication by setting the `WEB_AUTHENTICATION` environment 469 | variable to `1`. See the [Environment Variables](#environment-variables) section 470 | for details on configuring environment variables. 471 | 472 | > [!IMPORTANT] 473 | > Web authentication requires a secure connection to be enabled. See 474 | > [Security](#security) for details. 475 | 476 | #### Configuring Users Credentials 477 | 478 | User credentials can be configured in two ways: 479 | 480 | 1. Via container environment variables. 481 | 2. Via a password database. 482 | 483 | Container environment variables provide a quick way to configure a single user. 484 | Set the username and password using: 485 | - `WEB_AUTHENTICATION_USERNAME` 486 | - `WEB_AUTHENTICATION_PASSWORD` 487 | 488 | See the [Environment Variables](#environment-variables) section for details on 489 | configuring environment variables. 490 | 491 | For a more secure method or to configure multiple users, use a password database 492 | at `/config/webauth-htpasswd` within the container. This file uses the Apache 493 | HTTP server's htpasswd format, storing bcrypt-hashed passwords. 494 | 495 | Manage users with the `webauth-user` tool: 496 | - Add a user: `docker exec -ti webauth-user add ` 497 | - Update a user: `docker exec -ti webauth-user update ` 498 | - Remove a user: `docker exec webauth-user del ` 499 | - List users: `docker exec webauth-user list` 500 | 501 | ## Reverse Proxy 502 | 503 | The following sections provide NGINX configurations for setting up a reverse 504 | proxy to this container. 505 | 506 | A reverse proxy server can route HTTP requests based on the hostname or URL 507 | path. 508 | 509 | ### Routing Based on Hostname 510 | 511 | In this scenario, each hostname is routed to a different application or 512 | container. 513 | 514 | For example, if the reverse proxy server runs on the same machine as this 515 | container, it would proxy all HTTP requests for `tsmuxer.domain.tld` to 516 | the container at `127.0.0.1:5800`. 517 | 518 | Here are the relevant configuration elements to add to the NGINX configuration: 519 | 520 | ```nginx 521 | map $http_upgrade $connection_upgrade { 522 | default upgrade; 523 | '' close; 524 | } 525 | 526 | upstream docker-tsmuxer { 527 | # If the reverse proxy server is not running on the same machine as the 528 | # Docker container, use the IP of the Docker host here. 529 | # Make sure to adjust the port according to how port 5800 of the 530 | # container has been mapped on the host. 531 | server 127.0.0.1:5800; 532 | } 533 | 534 | server { 535 | [...] 536 | 537 | server_name tsmuxer.domain.tld; 538 | 539 | location / { 540 | proxy_pass http://docker-tsmuxer; 541 | } 542 | 543 | location /websockify { 544 | proxy_pass http://docker-tsmuxer; 545 | proxy_http_version 1.1; 546 | proxy_set_header Upgrade $http_upgrade; 547 | proxy_set_header Connection $connection_upgrade; 548 | proxy_read_timeout 86400; 549 | } 550 | 551 | # Needed when audio support is enabled. 552 | location /websockify-audio { 553 | proxy_pass http://docker-tsmuxer; 554 | proxy_http_version 1.1; 555 | proxy_set_header Upgrade $http_upgrade; 556 | proxy_set_header Connection $connection_upgrade; 557 | proxy_read_timeout 86400; 558 | } 559 | } 560 | 561 | ``` 562 | 563 | ### Routing Based on URL Path 564 | 565 | In this scenario, the same hostname is used, but different URL paths route to 566 | different applications or containers. For example, if the reverse proxy server 567 | runs on the same machine as this container, it would proxy all HTTP requests for 568 | `server.domain.tld/filebot` to the container at `127.0.0.1:5800`. 569 | 570 | Here are the relevant configuration elements to add to the NGINX configuration: 571 | 572 | ```nginx 573 | map $http_upgrade $connection_upgrade { 574 | default upgrade; 575 | '' close; 576 | } 577 | 578 | upstream docker-tsmuxer { 579 | # If the reverse proxy server is not running on the same machine as the 580 | # Docker container, use the IP of the Docker host here. 581 | # Make sure to adjust the port according to how port 5800 of the 582 | # container has been mapped on the host. 583 | server 127.0.0.1:5800; 584 | } 585 | 586 | server { 587 | [...] 588 | 589 | location = /tsmuxer {return 301 $scheme://$http_host/tsmuxer/;} 590 | location /tsmuxer/ { 591 | proxy_pass http://docker-tsmuxer/; 592 | # Uncomment the following line if your Nginx server runs on a port that 593 | # differs from the one seen by external clients. 594 | #port_in_redirect off; 595 | location /tsmuxer/websockify { 596 | proxy_pass http://docker-tsmuxer/websockify; 597 | proxy_http_version 1.1; 598 | proxy_set_header Upgrade $http_upgrade; 599 | proxy_set_header Connection $connection_upgrade; 600 | proxy_read_timeout 86400; 601 | } 602 | # Needed when audio support is enabled. 603 | location /tsmuxer/websockify-audio { 604 | proxy_pass http://docker-tsmuxer/websockify-audio; 605 | proxy_http_version 1.1; 606 | proxy_set_header Upgrade $http_upgrade; 607 | proxy_set_header Connection $connection_upgrade; 608 | proxy_read_timeout 86400; 609 | } 610 | } 611 | } 612 | 613 | ``` 614 | 615 | ### Web Audio 616 | 617 | The container supports streaming audio from the application, played through the 618 | user's web browser. Audio is not supported for VNC clients. 619 | 620 | Audio is streamed with the following specification: 621 | 622 | * Raw PCM format 623 | * 2 channels 624 | * 16-bit sample depth 625 | * 44.1kHz sample rate 626 | 627 | Enable web audio by setting `WEB_AUDIO` to `1`. See the 628 | [Environment Variables](#environment-variables) section for details on 629 | configuring environment variables. 630 | 631 | ### Web File Manager 632 | 633 | The container includes a simple file manager for interacting with container 634 | files through a web browser, supporting operations like renaming, deleting, 635 | uploading, and downloading. 636 | 637 | Enable the file manager by setting `WEB_FILE_MANAGER` to `1`. See the 638 | [Environment Variables](#environment-variables) section for details on 639 | configuring environment variables. 640 | 641 | By default, the container's entire filesystem is not accessible. The 642 | `WEB_FILE_MANAGER_ALLOWED_PATHS` environment variable is a comma-separated list 643 | that specifies which paths within the container are allowed to be accessed. When 644 | set to `AUTO` (the default), it automatically includes commonly used folders and 645 | any folders mapped to the container. 646 | 647 | The `WEB_FILE_MANAGER_DENIED_PATHS` environment variable defines which paths are 648 | explicitly denied access by the file manager. A denied path takes precedence 649 | over an allowed one. 650 | 651 | ## Shell Access 652 | 653 | To access the shell of a running container, execute the following command: 654 | 655 | ```shell 656 | docker exec -ti CONTAINER sh 657 | ``` 658 | 659 | Where `CONTAINER` is the ID or the name of the container used during its 660 | creation. 661 | 662 | ## Support or Contact 663 | 664 | Having troubles with the container or have questions? Please 665 | [create a new issue](https://github.com/jlesage/docker-tsmuxer/issues). 666 | 667 | For other Dockerized applications, visit https://jlesage.github.io/docker-apps. 668 | -------------------------------------------------------------------------------- /appdefs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # 4 | # Definitions for tsMuxeR docker container. 5 | # 6 | # This file is used as data source to generate README.md and unRAID template files 7 | # from Jinja2 templates. 8 | # 9 | 10 | app: 11 | id: 8 12 | name: tsmuxer 13 | friendly_name: tsMuxeR 14 | gui_type: x11 15 | base_os: alpine 16 | project: 17 | description: |- 18 | tsMuxer is a Transport Stream muxer. Remux/mux elementary streams, EVO/VOB/MPG, 19 | MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264, VC-1, 20 | MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD. Ability to set 21 | muxing fps manually and automatically, change level for H.264 streams, shift 22 | sound tracks, extract DTS core from DTS-HD, join files. Output/author to 23 | compliant Blu-ray Disc or AVCHD. Blu-ray 3D support. 24 | url: https://github.com/justdan96/tsMuxer 25 | unraid: 26 | support_url: https://forums.unraid.net/topic/58629-support-tsmuxer/ 27 | category: "MediaApp:Video" 28 | documentation: 29 | changelog: 30 | - version: 25.07.2 31 | date: 2025-07-28 32 | changes: 33 | - 'Updated baseimage to version 4.9.0.' 34 | - version: 25.07.1 35 | date: 2025-07-05 36 | changes: 37 | - 'Updated baseimage to version 4.8.2, which brings the following changes:' 38 | - '2:Fixed automatic reconnect of the web interface when web authentication is enabled.' 39 | - '2:Fixed some resources that could not be accessed behind a reverse proxy based on URL path.' 40 | - version: 25.06.2 41 | date: 2025-06-25 42 | changes: 43 | - 'Updated baseimage to version 4.8.1, which brings the following changes:' 44 | - '2:Fixed crash with some binaries on systems using old kernel.' 45 | - version: 25.06.1 46 | date: 2025-06-23 47 | changes: 48 | - 'Updated baseimage to version 4.8.0, which brings the following changes:' 49 | - '2:Added automatic reconnect support of the web interface.' 50 | - '2:Added web file manager.' 51 | - '2:Updated noVNC to version 1.6.0.' 52 | - '2:Updated web UI components (Bootstrap).' 53 | - '2:Do not ask VNC password when accessing the web interface and web authentication is enabled.' 54 | - version: 25.04.1 55 | date: 2025-04-25 56 | changes: 57 | - 'Updated tsMuxeR to version 2.7.0.' 58 | - version: 25.02.1 59 | date: 2025-02-09 60 | changes: 61 | - 'Updated baseimage to version 4.7.1, which brings the following changes (since last used version):' 62 | - '2:Added environment variable that allows configuring the web authentication token lifetime.' 63 | - '2:Fixed compatibility issues that were introduced with support of GTK4 applications.' 64 | - '2:Increased the default service ready timeout from 5 seconds to 10 seconds and allow runtime adjustment via environment variable.' 65 | - '2:Rebuild against latest distro images to get security fixes.' 66 | - version: 24.12.1 67 | date: 2024-12-07 68 | changes: 69 | - 'Updated baseimage to version 4.6.7, which brings the following changes:' 70 | - '2:Fixed web audio feature with URL path-based reverse proxy.' 71 | - '2:Fixed TLS secure connection method for VNC that was preventing web access.' 72 | - '2:Fixed CJK font installation.' 73 | - '2:Rebuild against latest distro images to get security fixes.' 74 | - version: 24.09.1 75 | date: 2024-09-29 76 | changes: 77 | - 'Updated baseimage to version 4.6.4, which brings the following changes:' 78 | - '2:Fixed web authentication feature with URL path-based reverse proxy.' 79 | - '2:Rebuild against latest distro images to get security fixes.' 80 | - version: 24.07.1 81 | date: 2024-07-03 82 | changes: 83 | - 'Updated tsMuxeR to version nightly-2024-06-06-02-00-53.' 84 | - 'Updated baseimage to version 4.6.3, which brings the following changes:' 85 | - '2:Audio support through web browser.' 86 | - '2:Web authentication support.' 87 | - '2:Better support of GTK4 applications.' 88 | - '2:Updated noVNC to version 1.5.0.' 89 | - '2:Updated web UI components (Bootstrap, Font Awesome).' 90 | - '2:When connecting, the control bar is now temporarily shown only once.' 91 | - '2:During package mirror setup, make sure to keep permissions of copied files.' 92 | - version: 24.01.1 93 | date: 2024-01-23 94 | changes: 95 | - 'Updated tsMuxeR to version nightly-2023-11-26-02-00-15.' 96 | - 'Updated baseimage to version 4.5.3, which brings the following changes:' 97 | - '2:Disabled fullscreen support when page is loaded into an iFrame.' 98 | - '2:Rebuilt against latest distro images to get security fixes.' 99 | - version: 23.11.2 100 | date: 2023-11-19 101 | changes: 102 | - 'Updated baseimage to version 4.5.2, which brings the following changes:' 103 | - '2:Fixed issue that would cause the helper that takes ownership of a directory to fail when using a very high user or group ID.' 104 | - version: 23.11.1 105 | date: 2023-11-10 106 | changes: 107 | - 'Updated baseimage to version 4.5.1, which brings the following changes:' 108 | - '2:Mirror for packages installation can be set via the `PACKAGES_MIRROR` environment variable.' 109 | - '2:Improved the way the `take-ownership` script is working.' 110 | - '2:Readiness and minimum running time checks should not be done for a service defined with an interval.' 111 | - '2:Raise an error when a synched service fails to start.' 112 | - '2:Minimum running time check of a service was using an incorrect way to verify if process is still alive.' 113 | - '2:Fixed installation of CJK font.' 114 | - version: 23.10.1 115 | date: 2023-10-16 116 | changes: 117 | - 'Updated tsMuxeR to version nightly-2023-10-11-01-53-10.' 118 | - version: 23.06.1 119 | date: 2023-06-08 120 | changes: 121 | - 'Updated tsMuxeR to version nightly-2023-06-04-02-47-33.' 122 | - version: 23.05.1 123 | date: 2023-05-27 124 | changes: 125 | - 'Updated tsMuxeR to version nightly-2023-05-26-02-07-16.' 126 | - 'Updated baseimage to version 4.4.2, which brings the following changes:' 127 | - '2:Rebuilt against latest distro images to get security fixes.' 128 | - '2:Updated X server to version 1.20.14.' 129 | - version: 23.04.1 130 | date: 2023-04-30 131 | changes: 132 | - 'Updated tsMuxer to version nightly-2023-04-13-02-05-26.' 133 | - 'Updated baseimage to version 4.4.1, which brings the following changes:' 134 | - '2:Updated TigerVNC to version 1.13.1.' 135 | - version: 23.03.1 136 | date: 2023-03-05 137 | changes: 138 | - 'Updated baseimage to version 4.4.0, which brings the following changes:' 139 | - '2:Updated components providing access to application''s UI over web.' 140 | - '2:Improved web UI usage with touch devices.' 141 | - '2:Fixed issue with initialization of Linux users and groups when the `GROUP_ID` is also part of `SUP_GROUP_IDS`.' 142 | - version: 23.02.3 143 | date: 2023-02-20 144 | changes: 145 | - 'Updated tsMuxeR to version nightly-2023-02-18-02-20-49.' 146 | - 'Updated baseimage to version 4.3.6, which brings robustness related enhancements.' 147 | - version: 23.02.2 148 | date: 2023-02-08 149 | changes: 150 | - 'Updated baseimage to version 4.3.4, which brings the following changes:' 151 | - '2:Fixed error message from openbox about missing Fontconfig cache directory.' 152 | - 'Do not use the OCI Docker image format yet to keep better compatibility (e.g with older docker clients).' 153 | - version: 23.02.1 154 | date: 2023-02-04 155 | changes: 156 | - 'Updated tsMuxeR to version nightly-2023-02-03-02-25-21.' 157 | - 'Updated baseimage to version 4.3.3, which brings robustness related enhancements.' 158 | - version: 23.01.1 159 | date: 2023-01-04 160 | changes: 161 | - 'Updated tsMuxeR to version 2023-01-02-02-15-09.' 162 | - 'Update of the baseimage to version 4.3.1 brings the following changes:' 163 | - '2:Control menu can be moved to the right side of the screen.' 164 | - '2:Automatic focus of the clipboard text box when opening the control menu.' 165 | - '2:Automatic close of the control menu when clicking into the application.' 166 | - '2:Rotation of the internal web server log files.' 167 | - version: 22.12.2 168 | date: 2022-12-11 169 | changes: 170 | - 'Implemented workaround for issue seen with Synology devices where container would not start after an image update. The problem is caused by Synology explicitly setting all environment variables and keeping values from the old version.' 171 | - version: 22.12.1 172 | date: 2022-12-09 173 | changes: 174 | - 'Updated tsMuxeR to version nightly-2022-11-23-02-43-45.' 175 | - 'Updated baseimage to version 4.2.1, which brings multiple internal enhancements.' 176 | - version: 22.11.1 177 | date: 2022-11-07 178 | changes: 179 | - 'Updated tsMuxeR to version nightly-2022-11-05-03-01-23.' 180 | - version: 22.10.1 181 | date: 2022-10-25 182 | changes: 183 | - 'Now using the open source version of tsMuxeR.' 184 | - 'Versioning scheme of the Docker image changed to `YY.MM.SEQUENCE`.' 185 | - 'Update of the baseimage to version 4.1.1 brings the following new features:' 186 | - '2:Multi-arch image support.' 187 | - '2:Support for dark mode.' 188 | - '2:Support for remote window resize.' 189 | - '2:Updated the web UI with a new, simplified and less intrusive look.' 190 | - version: 1.5.1 191 | date: 2019-04-25 192 | changes: 193 | - 'Now using baseimage v3.5.2, which brings the following changes:' 194 | - '2:Updated installed packages to get latest security fixes.' 195 | - '2:Fixed issue where the container could have a zombie process.' 196 | - '2:Fixed issue where the password would not be submitted when pressing the enter key in the password modal.' 197 | - '2:Use relative path for favicon ressources to be more friendly with reverse proxy senarios.' 198 | - version: 1.5.0 199 | date: 2018-09-19 200 | changes: 201 | - 'Now using baseimage v3.5.1, which brings the following changes (since last used version):' 202 | - '2:Image based on Alpine Linux 3.8.' 203 | - '2:Upgraded s6-overlay to version 1.21.4.0.' 204 | - '2:Wait for a limited time when terminating a service.' 205 | - '2:Set and create the XDG_RUNTIME_DIR directory.' 206 | - '2:Updated installed packages to get latest security fixes.' 207 | - version: 1.4.3 208 | date: 2018-03-02 209 | changes: 210 | - 'Now using baseimage v3.3.4, which brings the following changes (since last used version):' 211 | - '2:Make sure the log monitor is started after the X server.' 212 | - '2:Fixed an issue where the log monitor `yad` target would use XDG folders of the application.' 213 | - '2:Fixed issue where log monitor states were not cleared during container startup.' 214 | - version: 1.4.2 215 | date: 2018-02-03 216 | changes: 217 | - 'Now using baseimage v3.3.2, which brings the following changes:' 218 | - '2:Restored timezone support in Alpine Linux images with glibc.' 219 | - '2:Fixed issue in `add-pkg` helper where a package could be incorrectly detected as installed.' 220 | - version: 1.4.1 221 | date: 2018-01-30 222 | changes: 223 | - 'Now using baseimage v3.3.1, which brings the following changes:' 224 | - '2:Adjusted the way some ressources are accessed to better support reverse proxy to the container.' 225 | - version: 1.4.0 226 | date: 2018-01-22 227 | changes: 228 | - 'Now using baseimage v3.3.0, which brings the following changes (since last used version):' 229 | - '2:For Alpine Linux images with glibc, automatically update dynamic linker''s cache after new libraries are installed.' 230 | - '2:Fixed the LANG environment variable not being set properly.' 231 | - '2:Added the ability to automatically install a CJK (Chinese/Japanese/Korean) font.' 232 | - version: 1.3.4 233 | date: 2018-01-11 234 | changes: 235 | - 'Now using baseimage v3.2.2, which brings the following changes (since last used version):' 236 | - '2:Upgraded S6 overlay to version 1.21.2.2.' 237 | - '2:Upgraded glibc to version 2.26 (Alpine Linux glibc images).' 238 | - '2:Adjusted the way ownership of /config is taken to better support cases where the folder is mapped to a network share.' 239 | - 'Small adjustment to the way ownership of files are taken.' 240 | - version: 1.3.3 241 | date: 2017-12-12 242 | changes: 243 | - 'Now using baseimage v3.1.4, which brings the following changes:' 244 | - '2:Set 2 worker processes for nginx.' 245 | - version: 1.3.2 246 | date: 2017-11-20 247 | changes: 248 | - 'Now using baseimage v3.1.3, which brings the following changes:' 249 | - '2:Upgraded S6 overlay to version 1.21.2.1.' 250 | - version: 1.3.1 251 | date: 2017-11-07 252 | changes: 253 | - 'Now using baseimage v3.1.2, which brings the following changes (from last used version):' 254 | - '2:Fixed an issue where a self-disabled service could be restarted.' 255 | - '2:Upgraded S6 overlay to version 1.21.2.0.' 256 | - '2:Use a more efficient way to monitor status files.' 257 | - version: 1.3.0 258 | date: 2017-10-29 259 | changes: 260 | - 'Now using baseimage v3.1.0, which brings the following changes:' 261 | - '2:Upgraded S6 overlay to version 1.21.1.1.' 262 | - '2:Enhanced integration of service dependencies functionality.' 263 | - '2:Added a simple log monitor.' 264 | - '2:Fixed race condition where container''s exit code would not be the expected one.' 265 | - '2:Fixed issue where application''s GUI fails to displayed when accessing it through the web interface via standard ports 80/443.' 266 | - version: 1.2.2 267 | date: 2017-10-09 268 | changes: 269 | - 'Now using baseimage v3.0.2, which brings the following changes:' 270 | - '2:Fixed issue where nginx config change was not applied correctly on systems without IPV6 support and secure connection disabled.' 271 | - version: 1.2.1 272 | date: 2017-10-08 273 | changes: 274 | - 'Now using baseimage v3.0.1, which brings the following changes:' 275 | - '2:Fixed nginx config for systems without IPV6 support.' 276 | - version: 1.2.0 277 | date: 2017-10-07 278 | changes: 279 | - 'Now using baseimage v3.0.0, which brings the following changes:' 280 | - '2:Better support for service dependencies.' 281 | - '2:Added support for secure access to the application''s GUI.' 282 | - version: 1.1.6 283 | date: 2017-09-08 284 | changes: 285 | - 'Now using baseimage v2.0.8, which brings the following changes (from last used version):' 286 | - '2:Fixed timezone support on alpine-glibc images.' 287 | - '2:Fixed duplicated entries in /etc/passwd and /etc/group that were created after a restart of the container.' 288 | - version: 1.1.5 289 | date: 2017-08-14 290 | changes: 291 | - 'Now using baseimage v2.0.6, which brings the following changes:' 292 | - '2:Upgraded S6 overlay to version 1.20.0.0.' 293 | - version: 1.1.4 294 | date: 2017-07-31 295 | changes: 296 | - 'Now using baseimage v2.0.5, which brings the following changes (from last used version):' 297 | - '2:Clear the environment of the container during startup.' 298 | - '2:Clear the /tmp folder during startup.' 299 | - '2:Cleanly terminate the X server when container is restarted/stopped.' 300 | - '2:Improved robustness of X server starting process.' 301 | - '2:Removed unneeded files from the image.' 302 | - version: 1.1.3 303 | date: 2017-07-27 304 | changes: 305 | - 'Now using baseimage v2.0.3, which brings the following changes:' 306 | - '2:Improved robustness of the X server starting process.' 307 | - version: 1.1.2 308 | date: 2017-07-23 309 | changes: 310 | - 'Now using baseimage v2.0.2, which brings the following changes:' 311 | - '2:Proper VNC port is exposed.' 312 | - version: 1.1.1 313 | date: 2017-07-18 314 | changes: 315 | - 'Now using baseimage v2.0.1, which brings the following changes:' 316 | - '2:Internal enhancements.' 317 | - '2:Clean temporary files left by npm.' 318 | - version: 1.1.0 319 | date: 2017-07-17 320 | changes: 321 | - 'Now using baseimage v2.0.0, which brings the following changes:' 322 | - '2:Various internal enhancements.' 323 | - '2:Fixed the way a service waits for another one.' 324 | - version: 1.0.0 325 | date: 2017-07-08 326 | changes: 327 | - 'Initial release.' 328 | 329 | container: 330 | storage_permissions: rw 331 | 332 | # Environment variables. 333 | environment_variables: [] 334 | 335 | # Volumes 336 | volumes: [] 337 | 338 | # Network ports 339 | ports: [] 340 | 341 | # Devices 342 | devices: [] 343 | -------------------------------------------------------------------------------- /rootfs/defaults/Trolltech.conf: -------------------------------------------------------------------------------- 1 | [Qt] 2 | filedialog=@ByteArray(\0\0\0\xbe\0\0\0\x3\0\0\0\x1e\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\0[\0\0\xe\0\x1\0\0\0\x4\x1\0\0\0\x1\0\0\0\x2\0\0\0\x5\x66ile:\0\0\0\xf\x66ile:///storage\0\0\0\x1\0\0\0\x10\0/\0s\0t\0o\0r\0\x61\0g\0\x65\0\0\0\x10\0/\0s\0t\0o\0r\0\x61\0g\0\x65\0\0\0~\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1\xda\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xf4\0\0\0\x1\0\0\0\0\0\0\0>\0\0\0\x1\0\0\0\0\0\0\0>\0\0\0\x1\0\0\0\0\0\0\0j\0\0\0\x1\0\0\0\0\0\0\0\x1) 3 | -------------------------------------------------------------------------------- /rootfs/defaults/tsMuxeR.conf: -------------------------------------------------------------------------------- 1 | [%General] 2 | soundEnabled=false 3 | hdmvPES=true 4 | outputDir=/storage 5 | useBlankPL=true 6 | blankPLNum=1900 7 | outputToInputFolder=true 8 | 9 | [subtitles] 10 | fontBorder=5 11 | fontLineSpacing=1 12 | offset=24 13 | fadeTime=0 14 | famaly=Arial 15 | size=65 16 | color=4294967295 17 | options= 18 | 19 | [pip] 20 | corner=0 21 | h_offset=0 22 | v_offset=0 23 | size=0 24 | -------------------------------------------------------------------------------- /rootfs/etc/cont-init.d/55-tsmuxer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e # Exit immediately if a command exits with a non-zero status. 4 | set -u # Treat unset variables as an error. 5 | 6 | mkdir -p "$XDG_CONFIG_HOME/Network Optix" 7 | 8 | # Upgrade existing installations. 9 | [ ! -f /config/tsMuxeR.conf ] || mv -v /config/tsMuxeR.conf "$XDG_CONFIG_HOME/Network Optix/" 10 | [ ! -f /config/Trolltech.conf ] || mv -v /config/Trolltech.conf "$XDG_CONFIG_HOME/" 11 | 12 | # Copy default config if needed. 13 | [ -f /$XDG_CONFIG_HOME/"Network Optix"/tsMuxeR.conf ] || cp -v /defaults/tsMuxeR.conf "$XDG_CONFIG_HOME/Network Optix/" 14 | [ -f /$XDG_CONFIG_HOME/Trolltech.conf ] || cp -v /defaults/Trolltech.conf "$XDG_CONFIG_HOME/" 15 | 16 | # vim:ft=sh:ts=4:sw=4:et:sts=4 17 | -------------------------------------------------------------------------------- /rootfs/startapp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # NOTE: The $HOME variable is set only to have a default location when opening 3 | # the file dialog window. 4 | export HOME=/storage 5 | 6 | # Added to avoid the following error message: 7 | # MESA-LOADER: failed to open swrast: Error loading shared library 8 | # /usr/lib/xorg/modules/dri/swrast_dri.so: No such file or directory 9 | # (search paths /usr/lib/xorg/modules/dri, suffix _dri) 10 | # We could instead install `mesa-dri-gallium`, but this increases the image 11 | # size a lot. 12 | export QT_QPA_PLATFORM=xcb 13 | export QT_XCB_GL_INTEGRATION=none 14 | 15 | exec /usr/bin/tsMuxerGUI 16 | # vim:ft=sh:ts=4:sw=4:et:sts=4 17 | -------------------------------------------------------------------------------- /src/tsmuxer/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e # Exit immediately if a command exits with a non-zero status. 4 | set -u # Treat unset variables as an error. 5 | 6 | # Set same default compilation flags as abuild. 7 | export CFLAGS="-Os -fomit-frame-pointer" 8 | export CXXFLAGS="$CFLAGS" 9 | export CPPFLAGS="$CFLAGS" 10 | export LDFLAGS="-Wl,--strip-all -Wl,--as-needed" 11 | 12 | export CC=xx-clang 13 | export CXX=xx-clang++ 14 | 15 | function log { 16 | echo ">>> $*" 17 | } 18 | 19 | TSMUXER_VERSION="$1" 20 | TSMUXER_URL="$2" 21 | 22 | if [ -z "$TSMUXER_VERSION" ]; then 23 | log "ERROR: tsMuxeR version missing." 24 | exit 1 25 | fi 26 | 27 | if [ -z "$TSMUXER_URL" ]; then 28 | log "ERROR: tsMuxeR URL missing." 29 | exit 1 30 | fi 31 | 32 | # 33 | # Install required packages. 34 | # 35 | apk --no-cache add \ 36 | curl \ 37 | binutils \ 38 | git \ 39 | clang \ 40 | cmake \ 41 | make \ 42 | pkgconf \ 43 | imagemagick \ 44 | qtchooser \ 45 | qt5-qtbase-dev \ 46 | qt5-qttools-dev \ 47 | 48 | xx-apk --no-cache --no-scripts add \ 49 | musl-dev \ 50 | gcc \ 51 | g++ \ 52 | zlib-dev \ 53 | freetype-dev \ 54 | qt5-qtbase-dev \ 55 | qt5-qttools-dev \ 56 | qt5-qtmultimedia-dev \ 57 | 58 | # Make sure tools used to generate code are the ones from the host. 59 | if [ "$(xx-info sysroot)" != "/" ] 60 | then 61 | ln -sf /usr/bin/moc $(xx-info sysroot)usr/lib/qt5/bin/moc 62 | ln -sf /usr/bin/uic $(xx-info sysroot)usr/lib/qt5/bin/uic 63 | ln -sf /usr/bin/rcc $(xx-info sysroot)usr/lib/qt5/bin/rcc 64 | ln -sf /usr/bin/lrelease $(xx-info sysroot)usr/lib/qt5/bin/lrelease 65 | fi 66 | 67 | # 68 | # Download sources. 69 | # 70 | 71 | log "Downloading tsMuxeR package..." 72 | mkdir /tmp/tsmuxer 73 | curl -# -L -f ${TSMUXER_URL} | tar xz --strip 1 -C /tmp/tsmuxer 74 | 75 | # 76 | # Compile tsMuxeR. 77 | # 78 | 79 | # Set the version from commit hash. 80 | GIT_HASH="$(git ls-remote -t https://github.com/justdan96/tsMuxer.git | grep "$TSMUXER_VERSION" | awk '{print $1}' | head -c 8)" 81 | sed -i "s/\${TSMUXER_VERSION}/git-$GIT_HASH/" /tmp/tsmuxer/CMakeLists.txt 82 | 83 | log "Configuring tsMuxeR..." 84 | ( 85 | mkdir /tmp/tsmuxer/build && \ 86 | cd /tmp/tsmuxer/build && cmake \ 87 | $(xx-clang --print-cmake-defines) \ 88 | -DCMAKE_FIND_ROOT_PATH=$(xx-info sysroot) \ 89 | -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ 90 | -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ 91 | -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \ 92 | -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ 93 | -DCMAKE_INSTALL_PREFIX=/usr \ 94 | -DCMAKE_BUILD_TYPE=Release \ 95 | -DTSMUXER_GUI=ON \ 96 | .. 97 | ) 98 | 99 | # Remove embedded profile from PNGs to avoid the "known incorrect sRGB 100 | # profile" warning. 101 | find /tmp/tsmuxer -name "*.png" -exec echo "Removing embedded profiles from {}..." ';' -exec mogrify {} ';' 102 | 103 | log "Compiling tsMuxeR..." 104 | make -C /tmp/tsmuxer/build -j$(nproc) 105 | 106 | log "Installing tsMuxeR..." 107 | make DESTDIR=/tmp/tsmuxer-install -C /tmp/tsmuxer/build install 108 | --------------------------------------------------------------------------------