Skip to content

Commit 286411c

Browse files
committed
Remove example files, direct users to template branch, standardise links
1 parent 1e14fd2 commit 286411c

File tree

15 files changed

+24
-101
lines changed

15 files changed

+24
-101
lines changed

Dockerfile

-4
This file was deleted.

Dockerfile.complex

-21
This file was deleted.

README.md

+24-18
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ This allows:
99
* Zero cost hosting and build pipelines for these modifications leveraging GitHub Container Registry and Dockerhub
1010
* Full custom configuration management layers for hooking containers into each other using environment variables contained in a compose file
1111

12-
It is important to note to end users of this system that there are not only extreme security implications to consuming files from souces outside of our control, but by leveraging community Mods you essentially lose direct support from the core LinuxServer team. Our first and foremost troubleshooting step will be to remove the `DOCKER_MODS` environment variable when running into issues and replace the container with a clean LSIO one.
12+
It is important to note to end users of this system that there are not only extreme security implications to consuming files from sources outside of our control, but by leveraging community Mods you essentially lose direct support from the core LinuxServer team. Our first and foremost troubleshooting step will be to remove the `DOCKER_MODS` environment variable when running into issues and replace the container with a clean LSIO one.
1313

1414
Again, when pulling in logic from external sources practice caution and trust the sources/community you get them from.
1515

1616
## LinuxServer.io Hosted Mods
1717

1818
We host and publish official Mods at the [linuxserver/mods](https://github.com/orgs/linuxserver/packages/container/mods/versions) endpoint as separate tags. Each tag is in the format of `<imagename>-<modname>` for the latest versions, and `<imagename>-<modname>-<commitsha>` for the specific versions.
1919

20-
Here's a list of the official Mods we host: <https://mods.linuxserver.io/>
20+
Here's a list of the official Mods we host: [https://mods.linuxserver.io/](https://mods.linuxserver.io/)
2121

2222
## Using a Docker Mod
2323

@@ -31,6 +31,7 @@ Consumption of a Docker Mod is intended to be as user friendly as possible and c
3131
Full example:
3232

3333
docker run
34+
3435
```bash
3536
docker create \
3637
--name=nzbget \
@@ -44,7 +45,9 @@ docker create \
4445
--restart unless-stopped \
4546
linuxserver/nzbget
4647
```
48+
4749
docker compose
50+
4851
```yaml
4952
---
5053
services:
@@ -64,16 +67,17 @@ services:
6467
restart: unless-stopped
6568
```
6669
67-
This will spinup an nzbget container and apply the custom logic found in the following repository:
70+
This will spin up an nzbget container and apply the custom logic found in the following repository:
6871
69-
<https://github.com/Taisun-Docker/Linuxserver-Mod-Demo>
72+
[https://github.com/Taisun-Docker/Linuxserver-Mod-Demo](https://github.com/Taisun-Docker/Linuxserver-Mod-Demo)
7073
7174
This basic demo installs Pip and a couple dependencies for plugins some users leverage with nzbget.
7275
7376
## Creating and maintaining a Docker Mod
7477
75-
We will always recommend to our users consuming Mods that they leverage ones from active community members or projects so transparency is key here. We understand that image layers can be pushed on the back end behind these pipelines, but every little bit helps.
76-
In this repository we will be going over two basic methods of making a Mod along with an example of the GitHub Actions build logic to get this into a Dockerhub and/or GitHub Container Registry endpoint. Though we are not officially endorsing GitHub Actions here it is built in to GitHub repositories and forks making it very easy to get started. If you prefer others feel free to use them as long as build jobs are transparent.
78+
**All of the example files referenced in this section are available in the [template](https://github.com/linuxserver/docker-mods/tree/template) branch of this repo.**
79+
80+
We will always recommend to our users consuming Mods that they leverage ones from active community members or projects so transparency is key here. We understand that image layers can be pushed on the back end behind these pipelines, but every little bit helps. In this repository we will be going over two basic methods of making a Mod along with an example of the GitHub Actions build logic to get this into a Dockerhub and/or GitHub Container Registry endpoint. Though we are not officially endorsing GitHub Actions here it is built in to GitHub repositories and forks making it very easy to get started. If you prefer others feel free to use them as long as build jobs are transparent.
7781
7882
> **Note**
7983
> One of the core ideas to remember when creating a Mod is that it can only contain a **single image layer**, the examples below will show you how to add files standardly and how to run complex logic to assemble the files in a build layer to copy them over into this single layer.
@@ -186,7 +190,7 @@ In this repository you will find the `Dockerfile.complex` containing:
186190

187191
```Dockerfile
188192
## Buildstage ##
189-
FROM ghcr.io/linuxserver/baseimage-alpine:3.12 as buildstage
193+
FROM ghcr.io/linuxserver/baseimage-alpine:3.20 as buildstage
190194

191195
RUN \
192196
echo "**** install packages ****" && \
@@ -208,14 +212,14 @@ FROM scratch
208212
COPY --from=buildstage /root-layer/ /
209213
```
210214

211-
Here we are leveraging a multi stage DockerFile to run custom logic and pull down an Rclone deb from the Internet to include in our image layer for distribution. Any amount of logic can be run in this build stage or even multiple build stages as long as the files in the end are combined into a single folder for the COPY command in the final output.
215+
Here we are leveraging a multi stage DockerFile to run custom logic and pull down an rclone deb from the Internet to include in our image layer for distribution. Any amount of logic can be run in this build stage or even multiple build stages as long as the files in the end are combined into a single folder for the COPY command in the final output.
212216

213217
## Getting a Mod to Dockerhub
214218

215219
To publish a Mod to DockerHub you will need the following accounts:
216220

217-
* Github- <https://github.com/join>
218-
* DockerHub- <https://hub.docker.com/signup>
221+
* Github- [https://github.com/join](https://github.com/join)
222+
* DockerHub- [https://hub.docker.com/signup](https://hub.docker.com/signup)
219223

220224
We recommend using this repository as a template for your first Mod, so in this section we assume the code is finished and we will only concentrate on plugging into GitHub Actions/Dockerhub.
221225

@@ -232,15 +236,15 @@ Head over to `https://github.com/user/endpoint/settings/secrets` and click on `N
232236

233237
Add `DOCKERUSER` (your DockerHub username) and `DOCKERPASS` (your DockerHub password or token).
234238

235-
You can create a token by visiting <https://hub.docker.com/settings/security>
239+
You can create a token by visiting [https://hub.docker.com/settings/security](https://hub.docker.com/settings/security)
236240

237241
GitHub Actions will trigger a build off of your repo when you commit. The image will be pushed to Dockerhub on success. This Dockerhub endpoint is the Mod variable you can use to customize your container now.
238242

239243
## Getting a Mod to GitHub Container Registry
240244

241245
To publish a Mod to GitHub Container Registry you will need the following accounts:
242246

243-
* Github- <https://github.com/join>
247+
* Github- [https://github.com/join](https://github.com/join)
244248

245249
We recommend using this repository as a template for your first Mod, so in this section we assume the code is finished and we will only concentrate on plugging into GitHub Actions/GitHub Container Registry.
246250

@@ -251,13 +255,13 @@ The only code change you need to make to the build logic file `.github/workflows
251255
BRANCH: "master"
252256
```
253257

254-
User is your GitHub user and endpoint is your own custom name (typically the name of the repository where your mod is). You do not need to create this endpoint beforehand, the build logic will push it and create it on first run.
258+
`user` is your GitHub user and `endpoint` is your own custom name (typically the name of the repository where your mod is). You do not need to create this endpoint beforehand, the build logic will push it and create it on first run.
255259

256-
Head over to `https://github.com/user/endpoint/settings/secrets` and click on `New secret`
260+
Head over to `https://github.com/<user>/<endpoint>/settings/secrets` and click on `New secret`
257261

258262
Add `CR_USER` (your GitHub username) and `CR_PAT` (a personal access token with `read:packages` and `write:packages` scopes).
259263

260-
You can create a personal access token by visiting <https://github.com/settings/tokens>
264+
You can create a personal access token by visiting [https://github.com/settings/tokens](https://github.com/settings/tokens)
261265

262266
GitHub Actions will trigger a build off of your repo when you commit. The image will be pushed to GitHub Container Registry on success. This GitHub Container Registry endpoint is the Mod variable you can use to customize your container now.
263267

@@ -284,18 +288,20 @@ s6 init files must be encoded in plain `UTF-8`, and not `UTF-8 with BOM`. You ca
284288

285289
To inspect the file contents of external Mods dive is a great CLI tool:
286290

287-
<https://github.com/wagoodman/dive>
291+
[https://github.com/wagoodman/dive](https://github.com/wagoodman/dive)
288292

289293
Basic usage:
290294

291-
**Unix w/ Docker**
295+
#### With Docker
296+
292297
```bash
293298
docker run --rm -it \
294299
-v /var/run/docker.sock:/var/run/docker.sock \
295300
wagoodman/dive:latest <Image Name>
296301
```
297302

298-
**w/o Docker**
303+
#### Without Docker
304+
299305
```bash
300306
dive <Image Name>
301307
```

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

-24
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-universal-sshvpn/dependencies.d/init-mods

Whitespace-only changes.

root/etc/s6-overlay/s6-rc.d/init-mod-universal-sshvpn/run

-25
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-universal-sshvpn/type

-1
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-universal-sshvpn/up

-1
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mods-package-install/dependencies.d/init-mod-universal-sshvpn

Whitespace-only changes.

root/etc/s6-overlay/s6-rc.d/svc-mod-universal-sshvpn/dependencies.d/init-services

Whitespace-only changes.

root/etc/s6-overlay/s6-rc.d/svc-mod-universal-sshvpn/run

-3
This file was deleted.

root/etc/s6-overlay/s6-rc.d/svc-mod-universal-sshvpn/type

-1
This file was deleted.

root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-universal-sshvpn

Whitespace-only changes.

root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-mod-universal-sshvpn

Whitespace-only changes.

root/etc/services.d/sshvpn/run

-3
This file was deleted.

0 commit comments

Comments
 (0)