├── .gitattributes ├── .github └── workflows │ └── docker-publish.yml ├── Dockerfile ├── LICENSE ├── README.md └── root └── etc └── s6-overlay └── s6-rc.d ├── init-pas-config ├── dependencies.d │ └── init-config ├── run ├── type └── up ├── svc-pas ├── dependencies.d │ └── init-services ├── run └── type └── user └── contents.d ├── init-pas-config └── svc-pas /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Docker Publish 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'master' 7 | schedule: 8 | - cron: '0 5 * * 0' 9 | workflow_dispatch: 10 | 11 | env: 12 | tag: latest 13 | project: plexautoskip-docker 14 | 15 | jobs: 16 | docker: 17 | runs-on: ubuntu-latest 18 | strategy: 19 | matrix: 20 | include: 21 | - 22 | dockerfile: Dockerfile 23 | platform: amd64 24 | - 25 | dockerfile: Dockerfile 26 | platform: arm64 27 | steps: 28 | - 29 | name: Checkout 30 | uses: actions/checkout@v4 31 | - 32 | name: Set up QEMU 33 | uses: docker/setup-qemu-action@v3 34 | - 35 | name: Set up Docker Buildx 36 | uses: docker/setup-buildx-action@v3 37 | - 38 | name: Login to DockerHub 39 | uses: docker/login-action@v3 40 | with: 41 | username: ${{ secrets.DOCKER_USERNAME }} 42 | password: ${{ secrets.DOCKER_PASSWORD }} 43 | - 44 | name: Login to GitHub Container Registry 45 | uses: docker/login-action@v3 46 | with: 47 | registry: ghcr.io 48 | username: ${{ github.repository_owner }} 49 | password: ${{ github.token }} 50 | - 51 | name: Build and push 52 | uses: docker/build-push-action@v5 53 | with: 54 | context: . 55 | file: ./${{ matrix.dockerfile }} 56 | platforms: linux/${{ matrix.platform }} 57 | push: true 58 | provenance: false 59 | tags: | 60 | ${{ secrets.DOCKER_USERNAME }}/${{ env.project }}:${{ env.tag }}-${{ matrix.platform }} 61 | ghcr.io/${{ github.repository }}:${{ env.tag }}-${{ matrix.platform }} 62 | 63 | publish: 64 | runs-on: ubuntu-latest 65 | needs: [docker] 66 | steps: 67 | - 68 | name: Checkout 69 | uses: actions/checkout@v4 70 | - 71 | name: Login to DockerHub 72 | uses: docker/login-action@v3 73 | with: 74 | username: ${{ secrets.DOCKER_USERNAME }} 75 | password: ${{ secrets.DOCKER_PASSWORD }} 76 | - 77 | name: Login to GitHub Container Registry 78 | uses: docker/login-action@v3 79 | with: 80 | registry: ghcr.io 81 | username: ${{ github.repository_owner }} 82 | password: ${{ github.token }} 83 | - 84 | name: Create manifests 85 | env: 86 | DOCKER_CLI_EXPERIMENTAL: enabled 87 | run: | 88 | docker manifest create \ 89 | ${{ secrets.DOCKER_USERNAME }}/${{ env.project }}:${{ env.tag }} \ 90 | --amend ${{ secrets.DOCKER_USERNAME }}/${{ env.project }}:${{ env.tag }}-amd64 \ 91 | --amend ${{ secrets.DOCKER_USERNAME }}/${{ env.project }}:${{ env.tag }}-arm64 92 | docker manifest create \ 93 | ghcr.io/${{ github.repository }}:${{ env.tag }} \ 94 | --amend ghcr.io/${{ github.repository }}:${{ env.tag }}-amd64 \ 95 | --amend ghcr.io/${{ github.repository }}:${{ env.tag }}-arm64 96 | - 97 | name: Push manifests 98 | run: | 99 | docker manifest push ${{ secrets.DOCKER_USERNAME }}/${{ env.project }}:${{ env.tag }} 100 | docker manifest push ghcr.io/${{ github.repository }}:${{ env.tag }} 101 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/linuxserver/baseimage-alpine:3.17 2 | LABEL maintainer="mdhiggins " 3 | 4 | ENV PAS_PATH /usr/local/pas 5 | ENV PAS_UPDATE false 6 | 7 | # get python3 and git, and install python libraries 8 | RUN \ 9 | apk add --no-cache \ 10 | git \ 11 | python3 \ 12 | py3-pip && \ 13 | # make directory 14 | mkdir ${PAS_PATH} && \ 15 | # download repo 16 | git clone https://github.com/mdhiggins/PlexAutoSkip.git ${PAS_PATH} && \ 17 | # install pip, venv, and set up a virtual self contained python environment 18 | python3 -m pip install --user --upgrade pip && \ 19 | python3 -m pip install --user virtualenv && \ 20 | python3 -m virtualenv ${PAS_PATH}/venv && \ 21 | ${PAS_PATH}/venv/bin/pip install -r ${PAS_PATH}/setup/requirements.txt && \ 22 | # link config 23 | ln -s /config ${PAS_PATH}/config && \ 24 | # cleanup 25 | apk del --purge && \ 26 | rm -rf \ 27 | /root/.cache \ 28 | /tmp/* 29 | 30 | VOLUME /config 31 | 32 | # COPY extras/ ${PAS_PATH}/ 33 | COPY root/ / 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Michael Higgins 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PlexAutoSkip Official Docker Container 2 | 3 | Docker container for PlexAutoSkip 4 | 5 | ## Version Tags 6 | 7 | |Tag|Description| 8 | |---|---| 9 | |latest|Stable release| 10 | 11 | ## Usage 12 | 13 | ### docker-compose 14 | ``` 15 | plexautoskip: 16 | image: ghcr.io/mdhiggins/plexautoskip-docker 17 | container_name: plexautoskip 18 | environment: 19 | - PUID=${PUID} 20 | - PGID=${PGID} 21 | - TZ=${TZ} 22 | volumes: 23 | - /opt/appdata/plexautoskip:/config 24 | restart: unless-stopped 25 | ``` 26 | 27 | ### config directory 28 | - Mount config.ini and/or custom.json containing directory to `/config` using volumes, this should also contain your `logging.ini` file and any generated log files will be included in this directory 29 | 30 | ## Environment Variables 31 | |Variable|Description| 32 | |---|---| 33 | |PUID|User ID| 34 | |PGID|Group ID| 35 | |PAS_PATH|`/usr/local/pas`| 36 | |PAS_UPDATE|Set to `true` to update PlexAutoSkip from Github master on container start| 37 | -------------------------------------------------------------------------------- /root/etc/s6-overlay/s6-rc.d/init-pas-config/dependencies.d/init-config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdhiggins/plexautoskip-docker/9fdf815018c877453b8e236aabc61ae90f099e8e/root/etc/s6-overlay/s6-rc.d/init-pas-config/dependencies.d/init-config -------------------------------------------------------------------------------- /root/etc/s6-overlay/s6-rc.d/init-pas-config/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | # env check 4 | if [[ -z "${PAS_PATH}" ]]; then 5 | export PAS_PATH="/usr/local/pas" 6 | fi 7 | 8 | # update from git 9 | if [[ "${PAS_UPDATE}" == "true" ]] 10 | then 11 | echo "[init-pas-config] Pulling PlexAutoSkip from github master" 12 | git config --global --add safe.directory ${PAS_PATH} 13 | git -C ${PAS_PATH} pull origin master --quiet 14 | ${PAS_PATH}/venv/bin/pip install -q --no-cache-dir -r ${PAS_PATH}/setup/requirements.txt --upgrade > /dev/null 15 | fi 16 | 17 | # permissions 18 | chown -R abc:abc ${PAS_PATH} 19 | 20 | exit $? 21 | -------------------------------------------------------------------------------- /root/etc/s6-overlay/s6-rc.d/init-pas-config/type: -------------------------------------------------------------------------------- 1 | oneshot 2 | -------------------------------------------------------------------------------- /root/etc/s6-overlay/s6-rc.d/init-pas-config/up: -------------------------------------------------------------------------------- 1 | /etc/s6-overlay/s6-rc.d/init-pas-config/run 2 | -------------------------------------------------------------------------------- /root/etc/s6-overlay/s6-rc.d/svc-pas/dependencies.d/init-services: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdhiggins/plexautoskip-docker/9fdf815018c877453b8e236aabc61ae90f099e8e/root/etc/s6-overlay/s6-rc.d/svc-pas/dependencies.d/init-services -------------------------------------------------------------------------------- /root/etc/s6-overlay/s6-rc.d/svc-pas/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | cd ${PAS_PATH} || exit 4 | 5 | exec \ 6 | s6-setuidgid abc ${PAS_PATH}/venv/bin/python3 ${PAS_PATH}/main.py; -------------------------------------------------------------------------------- /root/etc/s6-overlay/s6-rc.d/svc-pas/type: -------------------------------------------------------------------------------- 1 | longrun -------------------------------------------------------------------------------- /root/etc/s6-overlay/s6-rc.d/user/contents.d/init-pas-config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdhiggins/plexautoskip-docker/9fdf815018c877453b8e236aabc61ae90f099e8e/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-pas-config -------------------------------------------------------------------------------- /root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdhiggins/plexautoskip-docker/9fdf815018c877453b8e236aabc61ae90f099e8e/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-pas --------------------------------------------------------------------------------