Skip to content

Commit fa7cc77

Browse files
authored
Merge pull request #282 from linuxserver/blog-transfer
2 parents 1561d6d + 7a5fdce commit fa7cc77

7 files changed

Lines changed: 76 additions & 48 deletions

File tree

27.6 KB
Loading
21.4 KB
Loading
25.6 KB
Loading

docs/general/.pages

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
nav:
2-
- container-execution.md
32
- containers-101.md
4-
- running-our-containers.md
3+
- container-branding.md
54
- container-customization.md
5+
- container-execution.md
66
- docker-compose.md
7-
- understanding-puid-and-pgid.md
8-
- updating-our-containers.md
9-
- volumes.md
107
- fleet.md
11-
- swag.md
128
- how-to-get-support.md
9+
- running-our-containers.md
1310
- split-dns.md
11+
- swag.md
12+
- understanding-puid-and-pgid.md
13+
- updating-our-containers.md
14+
- volumes.md

docs/general/container-branding.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Container Branding
2+
3+
If you use our base images for your own projects, or fork our downstream images to modify them, you're probably aware that we ask you to change the branding that appears in the container init logs to make it clear that your image is not associated with us. This is for your benefit as much as ours: we aren't well-equipped to provide your users with support, and you don't want them crediting us for your work.
4+
5+
Iif you build from one of our base images and don't change anything, your init logs will look something like this:
6+
7+
![Default Container Branding](../assets/images/lsio-branding1.png)
8+
9+
If you want to add your own branding, when using our base images or a forked downstream one, just place a file called `branding` containing the text you want to use into the `/etc/s6-overlay/s6-rc.d/init-adduser` folder of your image. The branding file will replace the highlighted section of the init:
10+
11+
![Default Container Branding with Hightlights](../assets/images/lsio-branding2.png)
12+
13+
On start-up, the base image will automatically load the branding into its init, allowing you to inflict whatever ASCII art you like on your users:
14+
15+
![Custom Container Branding](../assets/images/lsio-branding3.png)
16+
17+
Hopefully this makes it simpler for everyone to manage the branding of your images when using our bases.
18+
19+
A final note: if you've previously overridden the `init-adduser` run file to do custom branding, we recommend switching to the above approach so that you don't miss out on any future changes to that init step.

docs/general/container-customization.md

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ Behind the scenes we have been working to provide the community with the ability
1212

1313
All of the functionality described in this post is live on every one of the containers we currently maintain:
1414

15-
<https://fleet.linuxserver.io>
15+
[https://fleet.linuxserver.io](https://fleet.linuxserver.io)
1616

1717
!!! note
18-
While the following support has been added to our containers, we will not give support to any custom scripts, services, or mods. If you are having an issue with one of our containers, be sure to disable all custom scripts/services/mods before seeking support.
18+
While the following support has been added to our containers, we will not provide formal support to any custom scripts, services, or mods. If you are having an issue with one of our containers, be sure to disable all custom scripts/services/mods before seeking support. See our [Support Policy](https://linuxserver.io/supportpolicy) for more details.
1919

2020
## Custom Scripts
2121

22-
The first part of this update is the support for a user's custom scripts to run at startup. In every container, simply create a new folder located at `/custom-cont-init.d` and add any scripts you want. These scripts can contain logic for installing packages, copying over custom files to other locations, or installing plugins.
22+
The first part of this update is the support for a user's custom scripts to run at startup. In every container, simply create a new folder located at `/custom-cont-init.d` and add any scripts you want. These scripts can contain logic for installing packages, copying over custom files to other locations, or installing plugins. All custom scripts must be marked as executable, or they will be ignored, and should be owned by `root` and not the user running the container.
23+
24+
Custom Scripts run *after* built-in and any applied mod init steps but *before* any services start.
2325

2426
Because this location is outside of `/config` you will need to mount it like any other volume if you wish to make use of it. e.g. `-v /home/foo/appdata/my-custom-files:/custom-cont-init.d` if using the Docker CLI or
2527

@@ -33,7 +35,7 @@ services:
3335
3436
if using compose. Where possible, to improve security, we recommend mounting them read-only (`:ro`) so that container processes cannot write to the location.
3537

36-
One example use case is our Piwigo container has a plugin that supports video, but requires ffmpeg to be installed. No problem. Add this bad boy into a script file (can be named anything) and you're good to go.
38+
One example use case is our Piwigo container, which has a plugin that supports video, but requires ffmpeg to be installed. No problem. Add the following into a script file (can be named anything) and you're good to go.
3739

3840
```shell
3941
#!/bin/bash
@@ -42,12 +44,14 @@ echo "**** installing ffmpeg ****"
4244
apk add --no-cache ffmpeg
4345
```
4446

45-
!!! note
46-
The folder `/custom-cont-init.d` needs to be owned by root! If this is not the case, this folder will be renamed and a new (empty) folder will be created. This is to prevent remote code execution by putting scripts in the aforementioned folder.
47-
4847
## Custom Services
4948

50-
There might also be a need to run an additional service in a container alongside what we already package. Similarly to the custom scripts, just create a new directory at `/custom-services.d`. The files in this directory should be named after the service they will be running. Similar to with custom scripts you will need to mount this folder like any other volume if you wish to make use of it. e.g. `-v /home/foo/appdata/my-custom-services:/custom-services.d` if using the Docker CLI or
49+
50+
There might also be a need to run an additional service in a container alongside what we already package. Similarly to the custom scripts, just create a new directory at `/custom-services.d`. The files in this directory should be named after the service they will be running.
51+
52+
Custom Services run *after* built-in and any applied mod services and are effectively the last thing to run during container startup.
53+
54+
Similar to with custom scripts you will need to mount this folder like any other volume if you wish to make use of it. e.g. `-v /home/foo/appdata/my-custom-services:/custom-services.d` if using the Docker CLI or
5155

5256
```yaml
5357
services:
@@ -59,66 +63,66 @@ services:
5963

6064
if using compose. Where possible, to improve security, we recommend mounting them read-only (`:ro`) so that container processes cannot write to the location.
6165

62-
Running cron in our containers is now as simple as a single file. Drop this script in `/custom-services.d/cron` and it will run automatically in the container:
66+
Running something like memcached in our containers is now as simple as a single file. Drop this script in `/custom-services.d/memcached` and it will run automatically in the container:
6367

64-
```shell
68+
```bash
6569
#!/usr/bin/with-contenv bash
6670
67-
/usr/sbin/crond -f -S -l 0 -c /etc/crontabs
71+
exec memcached -u abc
6872
```
6973

7074
!!! note
71-
With this example, you will most likely need to have cron installed via a custom script using the technique in the previous section, and will need to populate the crontab.
72-
73-
!!! note
74-
The folder `/custom-services.d` needs to be owned by root! If this is not the case, this folder will be renamed and a new (empty) folder will be created. This is to prevent remote code execution by putting scripts in the aforementioned folder.
75+
In most cases you will need to have the application in question installed via a custom script using the technique in the previous section to be able to then run it as a service.
7576

7677
## Docker Mods
7778

7879
In most cases if you needed to write some kind of custom logic to get a plugin to work or to use some kind of popular external service you will not be the only one that finds this logic useful.
7980

80-
If you would like to publish and support your hard work we provide a system for a user to pass a single environment variable to the container to ingest your custom modifications.
81+
If you would like to publish and support your hard work, we provide a system for a user to pass a single environment variable to the container to ingest your custom modifications.
8182

8283
We consume Mods from Dockerhub and in order to publish one following our guide, you only need a Github Account and a Dockerhub account. [(Our guide and example code can be found here)](https://github.com/linuxserver/docker-mods)
8384

8485
Essentially it is a system that stashes a tarball of scripts and any other files you need in an image layer on Dockerhub. When we spin up the container we will download this tarball and extract it to /.
8586

8687
This allows community members to publish a relatively static pile of logic that will always be applied to an end user's up to date Linuxserver.io container.
8788

88-
An example of how this logic can be used to greatly expand the functionality of our base containers would be to add VPN support to a Transmission container:
89+
An example of how this logic can be used to greatly expand the functionality of our base containers would be to add [cloudflared](https://github.com/cloudflare/cloudflared) support to a container:
8990

90-
```shell
91-
docker create \
92-
--name=transmission \
93-
--cap-add=NET_ADMIN \
94-
-e PUID=1000 \
95-
-e PGID=1000 \
96-
-e DOCKER_MODS=taisun/config-mods:pia \
97-
-e PIAUSER=pmyuser \
98-
-e PIAPASS=mypassword \
99-
-e PIAENDPOINT="US New York City" \
100-
-e TZ=US/Eastern \
101-
-p 9091:9091 \
102-
-p 51413:51413 \
103-
-p 51413:51413/udp \
104-
-v path to data:/config \
105-
-v path to downloads:/downloads \
106-
-v path to watch folder:/watch \
107-
--restart unless-stopped \
108-
linuxserver/transmission
91+
```yaml
92+
nginx:
93+
image: lscr.io/linuxserver/nginx
94+
container_name: nginx
95+
environment:
96+
PUID: 1000
97+
PGID: 1000
98+
TZ: Europe/London
99+
DOCKER_MODS: lscr.io/linuxserver/mods:universal-cloudflared
100+
CF_ZONE_ID: zone_id
101+
CF_ACCOUNT_ID: acct_id
102+
CF_API_TOKEN: token
103+
CF_TUNNEL_NAME: example
104+
CF_TUNNEL_PASSWORD: pleasedontusethisexamplepassword
105+
CF_TUNNEL_CONFIG: |
106+
ingress:
107+
- hostname: test.example.com
108+
service: http://localhost:80
109+
- service: http_status:404
110+
volumes:
111+
- /path/to/appdata/config:/config
112+
restart: unless-stopped
109113
```
110114

111-
The source code for this mod can be found [here](https://github.com/Taisun-Docker/config-mods/tree/master/pia).
115+
The source code for this mod can be found [here](https://github.com/linuxserver/docker-mods/tree/universal-cloudflared).
112116

113117
!!! note
114-
When pulling in logic from external sources practice caution and trust the sources/community you get them from, as there are extreme security implications to consuming files from sources outside of our control.
118+
When pulling in logic from 3rd party sources, practice caution and trust the sources/community you get them from, as there are extreme security implications to consuming files from sources outside our control.
115119

116120
## We are here to help
117121

118122
If you are interested in writing custom logic and possibly sharing it with the community in the form of a [Docker Mod](https://github.com/linuxserver/docker-mods) we are always available to help you out.
119123

120-
Our [Discord server](https://discord.gg/YWrKVTn) is best for quick direct contact and our [Forum](https://discourse.linuxserver.io/) for a longer running project.
124+
Our [Discord server](https://linuxserver.io/discord) is best for quick direct contact, and our [Forum](https://discourse.linuxserver.io) for a longer running project.
121125

122-
There is zero barrier to entry for these levels of container customization and you are in complete control.
126+
There is zero barrier to entry for these levels of container customization, and you are in complete control.
123127

124128
We are looking forward to your next creation.

docs/general/how-to-get-support.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
# How to get support
22

3-
1. Join our [discord server](https://discord.gg/YWrKVTn), read our [support policy](../misc/support-policy.md), and read the description of each channel before asking for support.
3+
1. Join our [Discord server](https://linuxserver.io/discord), read our [Support Policy](../misc/support-policy.md), and read the description of each channel before asking for support.
44
2. SSH to your server and run the following command to create an alias that gathers the information we require:
5+
56
```bash
67
alias lsiosupport='function _lsiosupport(){ uname -a > lsiosupport.txt; docker -v >> lsiosupport.txt; cat /etc/os-release >> lsiosupport.txt; docker inspect --format "$(wget -qO- https://docs.linuxserver.io/assets/run.tpl)" $1 >> lsiosupport.txt; docker logs $1 >> lsiosupport.txt; }; _lsiosupport'
78
```
9+
810
The alias gathers the following information: OS details, docker version, run command, and container logs.
911
3. Execute the alias with a container name:
12+
1013
```bash
1114
lsiosupport <container-name>
1215
```
16+
1317
Add `sudo` in the beginning if your user can't access docker.
1418
4. A file called `lsiosupport.txt` will be created in the current folder, open it with a text editor.
1519
5. Redact sensitive information such as: passwords, domains, emails, personal information, etc.
1620
**Don't redact information we need for troubleshooting such as: IPs, volumes, local paths, etc.**
1721
6. Upload the file to a pastebin like [PrivateBin](https://privatebin.net/) or [Gist](https://gist.github.com/).
18-
7. Post the link along with a detailed description of your issue in the appropriate discord support channel.
22+
7. Post the link along with a detailed description of your issue in the appropriate discord support channel.

0 commit comments

Comments
 (0)