From 5d3e277f0879004c843477429d84b82f81989bf4 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sun, 28 Aug 2022 16:41:28 +0100 Subject: [PATCH 1/4] Custom files notification --- content/issues/2022-08-29-custom-files.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 content/issues/2022-08-29-custom-files.md diff --git a/content/issues/2022-08-29-custom-files.md b/content/issues/2022-08-29-custom-files.md new file mode 100644 index 00000000..feff86e8 --- /dev/null +++ b/content/issues/2022-08-29-custom-files.md @@ -0,0 +1,21 @@ +--- +title: 'Notification: Changes For Custom Scripts & Services' +date: '2022-08-29 12:00:00Z' +informational: true +affected: + - 'Notifications' + - 'custom-files' + - 'custom-services' +section: issue +--- +We have long supported [customizing our containers](https://www.linuxserver.io/blog/2019-09-14-customizing-our-containers) via scripts and services as a simple way for users to add their own logic and packages to a container without having to modify the Dockerfile and maintain a local build of the image. As part of the broader refresh of our base images, which has already made changes to the way that [mods work](https://info.linuxserver.io/issues/2022-08-27-mods/), we are also making changes to custom files and services. + +### Custom Files + +These now reside in `/custom-cont-init.d` instead of under `/config/custom-cont-init.d` which allows us to decouple them from our permissions logic, and means we no longer have to create the folders even if people aren't using them. Beyond the change in location everything else remains the same - the folder and files need to be owned by root, the files need to be chmod `+x` and are executed in name order. + +### Custom Services + +Similar to custom files, these now reside in `/custom-services.d` instead of under `/config/custom-services.d` and need to be owned by root. However, there are more substantial additional changes for services as they now need to be compliant with s6 v3. For a summary please refer to the docker mods [README.MD](https://github.com/linuxserver/docker-mods/blob/master/README.md#new-v3-mods) and for more detail please refer to the s6-overlay [README.MD](https://github.com/just-containers/s6-overlay#writing-a-service-script). + +The old custom locations will continue to work for a while to provide time for users to migrate but will generate warnings in the logs, as well as writing files to the old locations to notify users of the changes. We will post another notice before we remove the legacy locations entirely. From 1c96a8f789e824d6bcfd4448dffa1953d54ceca4 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sun, 28 Aug 2022 16:50:53 +0100 Subject: [PATCH 2/4] Correct info for services --- content/issues/2022-08-29-custom-files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/issues/2022-08-29-custom-files.md b/content/issues/2022-08-29-custom-files.md index feff86e8..3cf68b98 100644 --- a/content/issues/2022-08-29-custom-files.md +++ b/content/issues/2022-08-29-custom-files.md @@ -16,6 +16,6 @@ These now reside in `/custom-cont-init.d` instead of under `/config/custom-cont- ### Custom Services -Similar to custom files, these now reside in `/custom-services.d` instead of under `/config/custom-services.d` and need to be owned by root. However, there are more substantial additional changes for services as they now need to be compliant with s6 v3. For a summary please refer to the docker mods [README.MD](https://github.com/linuxserver/docker-mods/blob/master/README.md#new-v3-mods) and for more detail please refer to the s6-overlay [README.MD](https://github.com/just-containers/s6-overlay#writing-a-service-script). +Similar to custom files, these now reside in `/custom-services.d` instead of under `/config/custom-services.d`. Beyond the change in location everything else remains the same - the folder and files need to be owned by root, and the service files need to be chmod `+x. The old custom locations will continue to work for a while to provide time for users to migrate but will generate warnings in the logs, as well as writing files to the old locations to notify users of the changes. We will post another notice before we remove the legacy locations entirely. From 4dcd29720dd28766fd3dd434d47a657e3d74f782 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sun, 28 Aug 2022 17:16:04 +0100 Subject: [PATCH 3/4] Add mount notes --- content/issues/2022-08-29-custom-files.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/content/issues/2022-08-29-custom-files.md b/content/issues/2022-08-29-custom-files.md index 3cf68b98..6de6820c 100644 --- a/content/issues/2022-08-29-custom-files.md +++ b/content/issues/2022-08-29-custom-files.md @@ -19,3 +19,17 @@ These now reside in `/custom-cont-init.d` instead of under `/config/custom-cont- Similar to custom files, these now reside in `/custom-services.d` instead of under `/config/custom-services.d`. Beyond the change in location everything else remains the same - the folder and files need to be owned by root, and the service files need to be chmod `+x. The old custom locations will continue to work for a while to provide time for users to migrate but will generate warnings in the logs, as well as writing files to the old locations to notify users of the changes. We will post another notice before we remove the legacy locations entirely. + +### Mounting Paths + +Because these new locations are outside of `/config` you will need to mount them like any other volume if you wish to make use of them. e.g. `-v /home/foo/appdata/my-custom-files:/custom-cont-init.d` if using the Docker CLI or + +```yaml +services: + bar: + volumes: + - /home/foo/appdata/bar:/config + - /home/foo/appdata/my-custom-files:/custom-cont-init.d +``` + +if using compose. Where possible, to improve security, we recommend mounting them read-only (`:ro`) so that container processes cannot write to the location. From 44cda2367c6124323613dd5b22e6162fa3699374 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sun, 28 Aug 2022 17:18:37 +0100 Subject: [PATCH 4/4] Fix missing backtick --- content/issues/2022-08-29-custom-files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/issues/2022-08-29-custom-files.md b/content/issues/2022-08-29-custom-files.md index 6de6820c..a0969dc1 100644 --- a/content/issues/2022-08-29-custom-files.md +++ b/content/issues/2022-08-29-custom-files.md @@ -16,7 +16,7 @@ These now reside in `/custom-cont-init.d` instead of under `/config/custom-cont- ### Custom Services -Similar to custom files, these now reside in `/custom-services.d` instead of under `/config/custom-services.d`. Beyond the change in location everything else remains the same - the folder and files need to be owned by root, and the service files need to be chmod `+x. +Similar to custom files, these now reside in `/custom-services.d` instead of under `/config/custom-services.d`. Beyond the change in location everything else remains the same - the folder and files need to be owned by root, and the service files need to be chmod `+x`. The old custom locations will continue to work for a while to provide time for users to migrate but will generate warnings in the logs, as well as writing files to the old locations to notify users of the changes. We will post another notice before we remove the legacy locations entirely.