Skip to content

Commit b2f6e77

Browse files
authored
Merge pull request #579 from linuxserver/transmission-floodui-initial
2 parents 6745950 + 1bbad6e commit b2f6e77

25 files changed

Lines changed: 55 additions & 136 deletions

File tree

.github/workflows/BuildImage.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,32 @@ name: Build Image
33
on: [push, pull_request, workflow_dispatch]
44

55
env:
6-
ENDPOINT: "linuxserver/mods" #don't modify
7-
BASEIMAGE: "replace_baseimage" #replace
8-
MODNAME: "replace_modname" #replace
6+
ENDPOINT: "linuxserver/mods"
7+
BASEIMAGE: "transmission"
8+
MODNAME: "floodui"
99

1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2.3.3
14+
- uses: actions/checkout@v3.1.0
1515

1616
- name: Build image
1717
run: |
18-
docker build --no-cache -t ${{ github.sha }} .
18+
FLOOD_VERSION=$(curl -s https://api.github.com/repos/johman10/flood-for-transmission/releases/latest | jq -rc ".tag_name")
19+
echo "FLOOD_VERSION=${FLOOD_VERSION}" >> $GITHUB_ENV
20+
docker build --no-cache --build-arg FLOOD_VERSION=${FLOOD_VERSION} -t ${{ github.sha }} .
1921
2022
- name: Tag image
2123
if: ${{ github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) }}
2224
run: |
2325
docker tag ${{ github.sha }} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}
26+
docker tag ${{ github.sha }} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${FLOOD_VERSION}
27+
docker tag ${{ github.sha }} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${FLOOD_VERSION}-${{ github.sha }}
2428
docker tag ${{ github.sha }} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
2529
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}
30+
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${FLOOD_VERSION}
31+
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${FLOOD_VERSION}-${{ github.sha }}
2632
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
2733
2834
- name: Credential check
@@ -48,6 +54,8 @@ jobs:
4854
if: ${{ github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) && env.CR_USER && env.CR_PAT }}
4955
run: |
5056
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
57+
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${FLOOD_VERSION}-${{ github.sha }}
58+
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${FLOOD_VERSION}
5159
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}
5260
5361
- name: Login to DockerHub
@@ -59,4 +67,6 @@ jobs:
5967
if: ${{ github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) && env.DOCKERUSER && env.DOCKERPASS }}
6068
run: |
6169
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
70+
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${FLOOD_VERSION}-${{ github.sha }}
71+
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${FLOOD_VERSION}
6272
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}

Dockerfile

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
1-
FROM scratch
1+
# syntax=docker/dockerfile:1
2+
3+
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage
24

3-
LABEL maintainer="username"
5+
ARG FLOOD_VERSION
6+
7+
RUN \
8+
echo "**** grab flood-for-transmission ****" && \
9+
if [ -z ${FLOOD_VERSION+x} ]; then \
10+
FLOOD_VERSION=$(curl -s "https://api.github.com/repos/johman10/flood-for-transmission/releases/latest" \
11+
| jq -rc ".tag_name"); \
12+
fi && \
13+
curl -o \
14+
/tmp/flood.tar.gz -L \
15+
"https://github.com/johman10/flood-for-transmission/releases/download/${FLOOD_VERSION}/flood-for-transmission.tar.gz" && \
16+
mkdir -p /root-layer/themes/flood-for-transmission && \
17+
tar xzf \
18+
/tmp/flood.tar.gz -C \
19+
/root-layer/themes/flood-for-transmission --strip-components=1
420

521
# copy local files
6-
COPY root/ /
22+
COPY root/ /root-layer/
23+
24+
## Single layer deployed image ##
25+
FROM scratch
26+
27+
LABEL maintainer="thespad"
28+
29+
# Add files from buildstage
30+
COPY --from=buildstage /root-layer/ /

Dockerfile.complex

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

README.md

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

3-
This mod adds rsync to openssh-server, to be installed/updated during container start.
3+
This mod adds Flood For Transmission 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-floodui`
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-floodui|linuxserver/mods:openssh-server-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-
* The mod should be compatible with both s6v2 and s6v3 (until s6v2 based baseimages are deprecated).
15-
* After all init scripts and services are created, run `find ./ -name run -exec chmod +x {} +; find ./ -name finish -exec chmod +x {} +` to fix permissions.
16-
* Edit this readme with pertinent info, delete these instructions.
17-
* Finally edit the `.github/workflows/BuildImage.yml`. Customize the build branch, and the vars for `BASEIMAGE` and `MODNAME`.
18-
* 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.
19-
* Submit PR against the branch created by the team.
20-
21-
22-
## Tips and tricks
23-
24-
* To decrease startup times when multiple mods are used, we have consolidated `apt-get update` down to one file. As seen in the [nodejs mod](https://github.com/linuxserver/docker-mods/tree/code-server-nodejs/root/etc/cont-init.d)
25-
* Some images has helpers built in, these images are currently:
26-
* [Openvscode-server](https://github.com/linuxserver/docker-openvscode-server/pull/10/files)
27-
* [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/cont-init.d/95-apt-get

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

root/etc/cont-init.d/98-vpn-config

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

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.

0 commit comments

Comments
 (0)