Skip to content

Commit 126cb25

Browse files
authored
Merge pull request #891 from azlux/transmission-trguing
trguing for transmission: new mod creation
2 parents 9d6b690 + 0f55ea4 commit 126cb25

File tree

22 files changed

+43
-109
lines changed

22 files changed

+43
-109
lines changed

.github/workflows/BuildImage.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ 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
10-
MULTI_ARCH: "true" #set to false if not needed
8+
BASEIMAGE: "transmission" #replace
9+
MODNAME: "trguing" #replace
10+
MULTI_ARCH: "false" #set to false if not needed
1111

1212
jobs:
1313
set-vars:
@@ -22,7 +22,7 @@ jobs:
2222
echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT
2323
echo "MULTI_ARCH=${{ env.MULTI_ARCH }}" >> $GITHUB_OUTPUT
2424
# **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
25-
MOD_VERSION=""
25+
MOD_VERSION=$(curl -s https://api.github.com/repos/openscopeproject/TrguiNG/releases/latest | jq -rc ".tag_name")
2626
echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT
2727
outputs:
2828
GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }}

Dockerfile

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

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

5-
LABEL maintainer="username"
7+
RUN \
8+
echo "**** grab transmission trguing ****" && \
9+
mkdir -p /root-layer/themes && \
10+
if [ -z ${MOD_VERSION} ]; then \
11+
MOD_VERSION=$(curl -s "https://api.github.com/repos/openscopeproject/TrguiNG/releases/latest" \
12+
| jq -rc ".tag_name"); \
13+
fi && \
14+
curl -o \
15+
/tmp/trguing-web.zip -L \
16+
"https://github.com/openscopeproject/TrguiNG/releases/download/${MOD_VERSION}/trguing-web-${MOD_VERSION}.zip" && \
17+
mkdir -p /root-layer/themes/trguing && \
18+
unzip \
19+
/tmp/trguing-web.zip -d \
20+
/root-layer/themes/trguing
621

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

Dockerfile.complex

Lines changed: 0 additions & 33 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+
# TrguiNG - Remote GUI for Transmission torrent daemon
22

3-
This mod adds rsync to openssh-server, to be installed/updated during container start.
3+
This mod adds TrguiNG 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-trguing`
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-trguing|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 and `MULTI_ARCH` 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-add-package/dependencies.d/init-mods renamed to root/etc/s6-overlay/s6-rc.d/init-mod-transmission-trguing-install/dependencies.d/init-mods

File renamed without changes.

0 commit comments

Comments
 (0)