Skip to content

Commit 065c3b1

Browse files
authored
Merge pull request #731 from FujiZ/transmission-transmission-web-control
transmission:transmission-web-control initial release
2 parents cc80a43 + 9d02a80 commit 065c3b1

File tree

22 files changed

+43
-100
lines changed

22 files changed

+43
-100
lines changed

.github/workflows/BuildImage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on: [push, pull_request_target, workflow_dispatch]
55
env:
66
GITHUB_REPO: "linuxserver/docker-mods" #don't modify
77
ENDPOINT: "linuxserver/mods" #don't modify
8-
BASEIMAGE: "replace_baseimage" #replace
9-
MODNAME: "replace_modname" #replace
8+
BASEIMAGE: "transmission" #replace
9+
MODNAME: "transmission-web-control" #replace
1010

1111
jobs:
1212
set-vars:
@@ -20,7 +20,7 @@ jobs:
2020
echo "BASEIMAGE=${{ env.BASEIMAGE }}" >> $GITHUB_OUTPUT
2121
echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT
2222
# **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
23-
MOD_VERSION=""
23+
MOD_VERSION=$(curl -s https://api.github.com/repos/ronggang/transmission-web-control/releases/latest | jq -rc ".tag_name")
2424
echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT
2525
outputs:
2626
GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }}

Dockerfile

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM scratch
3+
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage
4+
5+
ARG MOD_VERSION
46

5-
LABEL maintainer="username"
7+
RUN \
8+
echo "**** grab transmission-web-control ****" && \
9+
mkdir -p /root-layer/themes && \
10+
if [ -z ${MOD_VERSION} ]; then \
11+
MOD_VERSION=$(curl -s "https://api.github.com/repos/ronggang/transmission-web-control/releases/latest" \
12+
| jq -rc ".tag_name"); \
13+
fi && \
14+
curl -o \
15+
/tmp/transmission-web-control.tar.gz -L \
16+
"https://github.com/ronggang/transmission-web-control/archive/refs/tags/${MOD_VERSION}.tar.gz" && \
17+
mkdir -p /root-layer/themes/transmission-web-control && \
18+
tar xzf \
19+
/tmp/transmission-web-control.tar.gz -C \
20+
/root-layer/themes/transmission-web-control \
21+
$(tar tf /tmp/transmission-web-control.tar.gz | grep -E "^[^/]+/src") --strip-components=2
622

723
# copy local files
8-
COPY root/ /
24+
COPY root/ /root-layer/
25+
26+
# ## Single layer deployed image ##
27+
FROM scratch
28+
29+
LABEL maintainer="FujiZ"
30+
31+
# # Add files from buildstage
32+
COPY --from=buildstage /root-layer/ /

Dockerfile.complex

Lines changed: 0 additions & 25 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
1-
# Rsync - Docker mod for openssh-server
1+
# Transmission Web Control - Transmission UI Mod
22

3-
This mod adds rsync to openssh-server, to be installed/updated during container start.
3+
This mod adds Transmission Web Control to Transmission, to be installed/updated during container start.
44

5-
In openssh-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:openssh-server-rsync`
5+
In Transmission docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:transmission-transmission-web-control`
66

7-
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:openssh-server-rsync|linuxserver/mods:openssh-server-mod2`
7+
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:transmission-transmission-web-control|linuxserver/mods:transmission-mod2`
88

9-
# Mod creation instructions
9+
## Notes
1010

11-
* Fork the repo, create a new branch based on the branch `template`.
12-
* Edit the `Dockerfile` for the mod. `Dockerfile.complex` is only an example and included for reference; it should be deleted when done.
13-
* Inspect the `root` folder contents. Edit, add and remove as necessary.
14-
* After all init scripts and services are created, run `find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print -exec chmod +x {} +` to fix permissions.
15-
* Edit this readme with pertinent info, delete these instructions.
16-
* Finally edit the `.github/workflows/BuildImage.yml`. Customize the vars for `BASEIMAGE` and `MODNAME`. Set the versioning logic if needed.
17-
* Ask the team to create a new branch named `<baseimagename>-<modname>`. Baseimage should be the name of the image the mod will be applied to. The new branch will be based on the `template` branch.
18-
* Submit PR against the branch created by the team.
19-
20-
21-
## Tips and tricks
22-
23-
* Some images have helpers built in, these images are currently:
24-
* [Openvscode-server](https://github.com/linuxserver/docker-openvscode-server/pull/10/files)
25-
* [Code-server](https://github.com/linuxserver/docker-code-server/pull/95)
11+
* This mod will *overwrite* any existing `TRANSMISSION_WEB_HOME` environment variable that has been set.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/run

Lines changed: 0 additions & 30 deletions
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/up

Lines changed: 0 additions & 1 deletion
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/run

Lines changed: 0 additions & 8 deletions
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/type

Lines changed: 0 additions & 1 deletion
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/up

Lines changed: 0 additions & 1 deletion
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/dependencies.d/init-mods-package-install renamed to root/etc/s6-overlay/s6-rc.d/init-mod-transmission-transmission-web-control-install/dependencies.d/init-mods-package-install

File renamed without changes.

0 commit comments

Comments
 (0)