Compare commits
320 commits
edge-e17d4
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
458f79ca4b | ||
|
|
6ea8b43b0d | ||
|
|
113e0bf43b | ||
|
|
6a6256acd4 | ||
|
|
ac17141dc8 | ||
|
|
2c1f03e3a7 | ||
|
|
4775b97056 | ||
|
|
d9e9c8a664 | ||
|
|
ec8542f160 | ||
|
|
e1e80e60c0 | ||
|
|
59c62f1ae7 | ||
|
|
081f3bf4a3 | ||
|
|
a34a58bd62 | ||
|
|
64ecb6745f | ||
|
|
ba27487240 | ||
|
|
5e393c25ff | ||
|
|
5a3ccf4cf0 | ||
|
|
d48d182f0f | ||
|
|
8beeaeca45 | ||
|
|
12873dd927 | ||
|
|
1730537b24 | ||
|
|
7d602a73c4 | ||
|
|
2f5c0f11df | ||
|
|
2411390177 | ||
|
|
7777d8828d | ||
|
|
795d744a0f | ||
|
|
5dfe7d15c6 | ||
|
|
ff812c0651 | ||
|
|
70b76baa2f | ||
|
|
8f35e8139b | ||
|
|
6bd31eb477 | ||
|
|
481825d48e | ||
|
|
2926dbe73c | ||
|
|
c6b5263eb1 | ||
|
|
f272148962 | ||
|
|
bb5a7b16e2 | ||
|
|
1983fb36bb | ||
|
|
85bd229846 | ||
|
|
94ccace81c | ||
|
|
9ec43eb872 | ||
|
|
c822962c7a | ||
|
|
a2b17e520a | ||
|
|
6567cde19c | ||
|
|
719f49cb0a | ||
|
|
5b1eb38ce6 | ||
|
|
34006fe7e7 | ||
|
|
af2c6f228e | ||
|
|
b48c87eb2f | ||
|
|
ef81cb3b33 | ||
|
|
56d8fbb73f | ||
|
|
b9b51a1b93 | ||
|
|
46e3e8d74c | ||
|
|
4066c272d7 | ||
|
|
28e54925ca | ||
|
|
c4951e7021 | ||
|
|
f2844953b3 | ||
|
|
552137dbb1 | ||
|
|
3ae6c4fd66 | ||
|
|
cb6b200afc | ||
|
|
458334e3c1 | ||
|
|
d69c527089 | ||
|
|
3d21020c64 | ||
|
|
145020adaa | ||
|
|
ed4057339b | ||
|
|
9268218a5f | ||
|
|
cd796b3370 | ||
|
|
0b5f271f0e | ||
|
|
7cd7e1401c | ||
|
|
eb3cf22d0d | ||
|
|
f47b402a1a | ||
|
|
05763edeb2 | ||
|
|
f023763fe6 | ||
|
|
402e4abbc3 | ||
|
|
ff87e3bd5a | ||
|
|
a0702347af | ||
|
|
6cfbdd72c6 | ||
|
|
2263515ffb | ||
|
|
9626561aea | ||
|
|
725df02e95 | ||
|
|
bd4c1887c2 | ||
|
|
f7a30b5942 | ||
|
|
e971d0872f | ||
|
|
a03942aac4 | ||
|
|
1bfc5cb7a7 | ||
|
|
d2d759f136 | ||
|
|
443aa44015 | ||
|
|
36bfc31d62 | ||
|
|
0e7a9b6fbd | ||
|
|
07c4bf4594 | ||
|
|
3a67103736 | ||
|
|
330012ef01 | ||
|
|
9b393a8668 | ||
|
|
dbd643f8c3 | ||
|
|
bef0f4cee2 | ||
|
|
2b1fc3f6c8 | ||
|
|
09726961fd | ||
|
|
937caa6f19 | ||
|
|
3256bb4eeb | ||
|
|
6be18c0df7 | ||
|
|
89ebe1cc22 | ||
|
|
8b9dbd0bed | ||
|
|
1b98fd9bc7 | ||
|
|
7c6601c83a | ||
|
|
cf5896ce7c | ||
|
|
6bb5231d17 | ||
|
|
00db510002 | ||
|
|
5543e3dd0f | ||
|
|
a54b440055 | ||
|
|
d971cf0873 | ||
|
|
a8bbd50370 | ||
|
|
5461255904 | ||
|
|
c060e20690 | ||
|
|
fe39d670b7 | ||
|
|
1e9e41836b | ||
|
|
ed066bdae3 | ||
|
|
0166b15838 | ||
|
|
ab9e158526 | ||
|
|
b8c0295890 | ||
|
|
5e374ee43a | ||
|
|
816d25fbf7 | ||
|
|
96984e3854 | ||
|
|
8cf7e20755 | ||
|
|
aa9b7f4b95 | ||
|
|
7d5f74364e | ||
|
|
4fe4220a7e | ||
|
|
e434ab3fe3 | ||
|
|
1adb03aef0 | ||
|
|
a0d322b305 | ||
|
|
d2b85ed256 | ||
|
|
07df980344 | ||
|
|
466a927f40 | ||
|
|
15496c0fca | ||
|
|
39642821ec | ||
|
|
643409d275 | ||
|
|
8b124808ef | ||
|
|
d36f2ddbf4 | ||
|
|
76c8c4fd58 | ||
|
|
7fc5da5f71 | ||
|
|
91044234a7 | ||
|
|
eb4b14ce3c | ||
|
|
a7ba2053f0 | ||
|
|
a8465643b1 | ||
|
|
5d733ee571 | ||
|
|
08e780a773 | ||
|
|
a9ef2ccf6c | ||
|
|
eb6d5d5c12 | ||
|
|
370967709c | ||
|
|
72281a0cf8 | ||
|
|
c54869a7bd | ||
|
|
64afadbace | ||
|
|
a7ed4de8d4 | ||
|
|
31ef1b0d0a | ||
|
|
527b37252f | ||
|
|
fbb9785cd6 | ||
|
|
eea14b996e | ||
|
|
d2c30740b3 | ||
|
|
8f6304defe | ||
|
|
e128cf0cda | ||
|
|
bb923d4917 | ||
|
|
292e1ef85f | ||
|
|
062b99c30f | ||
|
|
62ae1165ed | ||
|
|
b11a5ca283 | ||
|
|
c675e2f545 | ||
|
|
00f7a6794e | ||
|
|
67cd47254a | ||
|
|
1a6f120c44 | ||
|
|
659bf29597 | ||
|
|
91a498c9e2 | ||
|
|
82bb8aa307 | ||
|
|
2180f0d64d | ||
|
|
8736a368e5 | ||
|
|
f72ffa6ad9 | ||
|
|
9fcf5d8681 | ||
|
|
a7991dea60 | ||
|
|
7b446f095d | ||
|
|
87dfb43832 | ||
|
|
5d59580279 | ||
|
|
df09f6d68c | ||
|
|
ad924e72a7 | ||
|
|
7596410d7f | ||
|
|
078343fa8c | ||
|
|
305e9a2c7e | ||
|
|
92bd611edb | ||
|
|
1009478827 | ||
|
|
4659d1bb57 | ||
|
|
fb53f2e1bc | ||
|
|
c1e8211ef7 | ||
|
|
a7218a6ab4 | ||
|
|
15f2972106 | ||
|
|
cd5e96dc7f | ||
|
|
672802cf04 | ||
|
|
de94dc1911 | ||
|
|
93731cdb69 | ||
|
|
855ddee102 | ||
|
|
dff708b8b7 | ||
|
|
505eaafb77 | ||
|
|
0fa7d8bbf2 | ||
|
|
4b88885e86 | ||
|
|
c82b92c605 | ||
|
|
ca4a42df4a | ||
|
|
19b9b4baef | ||
|
|
5aefb6cd61 | ||
|
|
4deecce65a | ||
|
|
12948902a1 | ||
|
|
81ae7dfe9b | ||
|
|
914b1f16a4 | ||
|
|
84b302cd60 | ||
|
|
0cd410af3d | ||
|
|
3e928ed92f | ||
|
|
0f6c8bd028 | ||
|
|
255b2a1b11 | ||
|
|
428152474d | ||
|
|
4e412a5fdc | ||
|
|
2ee8af10f9 | ||
|
|
34300133f6 | ||
|
|
1bc2cd870f | ||
|
|
256cbbff64 | ||
|
|
c773341cea | ||
|
|
f4f76d6918 | ||
|
|
fe11b1ded7 | ||
|
|
12eda7a831 | ||
|
|
fd0e34c1f5 | ||
|
|
261c0b7c50 | ||
|
|
14ba912cf0 | ||
|
|
82d4508817 | ||
|
|
ea2e584fde | ||
|
|
d7bdc2a516 | ||
|
|
55cff18284 | ||
|
|
61b7bb68e5 | ||
|
|
a507fbf537 | ||
|
|
696a16f01b | ||
|
|
6e7eb8a8d3 | ||
|
|
91f450f06c | ||
|
|
00a0bd1d2c | ||
|
|
110ea527e9 | ||
|
|
2f02d2559c | ||
|
|
d1d84fac4c | ||
|
|
ef5ebc65e4 | ||
|
|
0e55439386 | ||
|
|
75b3115d75 | ||
|
|
e1f14ef6e1 | ||
|
|
1f816f0fd2 | ||
|
|
5eb25b8357 | ||
|
|
7f8d142552 | ||
|
|
10d77113b5 | ||
|
|
ea7f9dddff | ||
|
|
7b8515c27e | ||
|
|
00cc255a45 | ||
|
|
9c126e46cc | ||
|
|
e0fd8cb964 | ||
|
|
4f4d988211 | ||
|
|
ec2e9b7ac0 | ||
|
|
7519dd8f97 | ||
|
|
595c036d6d | ||
|
|
9b753d0667 | ||
|
|
eabdf1cf32 | ||
|
|
d8547ab363 | ||
|
|
2de8130702 | ||
|
|
2edf79aab1 | ||
|
|
b0a2852692 | ||
|
|
34eee09951 | ||
|
|
6ba2997eeb | ||
|
|
42825ece45 | ||
|
|
35e90d8ef5 | ||
|
|
201227b220 | ||
|
|
b7b477c8d6 | ||
|
|
34f4a4681c | ||
|
|
29c0ee219d | ||
|
|
4af8d4292f | ||
|
|
549772f05c | ||
|
|
a51ad09b7b | ||
|
|
2f97067d7e | ||
|
|
bd084de07d | ||
|
|
4d28a9cdc6 | ||
|
|
3c7ccbd583 | ||
|
|
273f624f3a | ||
|
|
90d9d04a66 | ||
|
|
e696236d42 | ||
|
|
0e016f977e | ||
|
|
dd40de00b6 | ||
|
|
74a4516271 | ||
|
|
b5f9bf1093 | ||
|
|
bb2ab4ccdf | ||
|
|
e890f470b6 | ||
|
|
4f51cb2f4f | ||
|
|
5f3a505a50 | ||
|
|
97f69b8423 | ||
|
|
92595b45d8 | ||
|
|
c758822c55 | ||
|
|
d69c94cc2f | ||
|
|
1d9f2f3862 | ||
|
|
d7ac0a9a4e | ||
|
|
3e69697264 | ||
|
|
c285069d03 | ||
|
|
1dabda8b62 | ||
|
|
36c3f7ffb5 | ||
|
|
1f81e9ac8a | ||
|
|
92a97355b4 | ||
|
|
ec6eed279d | ||
|
|
32e37c440b | ||
|
|
6ac3a53809 | ||
|
|
2c28aeb4c8 | ||
|
|
f6f2804792 | ||
|
|
45b3854870 | ||
|
|
7383c0982b | ||
|
|
6f9c4d3d01 | ||
|
|
73de4c6c4c | ||
|
|
ca43caabd3 | ||
|
|
43abf13ebd | ||
|
|
35065baace | ||
|
|
a374f6d565 | ||
|
|
b8061f5abf | ||
|
|
75cacb5446 | ||
|
|
50056b0de7 | ||
|
|
dd6cea607a | ||
|
|
a6b4c3a750 | ||
|
|
94c906d4cb | ||
|
|
caa7a49b09 | ||
|
|
bfe8091ed5 |
|
|
@ -15,6 +15,6 @@ trim_trailing_whitespace = false
|
|||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}]
|
||||
[{**.sh,root/etc/s6-overlay/s6-rc.d/**,root/etc/cont-init.d/**,root/etc/services.d/**}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
|
|
|||
15
.forgejo/workflows/build.yaml
Normal file
15
.forgejo/workflows/build.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
name: build
|
||||
run-name: ${{ gitea.actor }} is building baseimage-alpine
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: podman
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: podman login --username registry --password ${{ secrets.MEATBAG_REGISTRY_TOKEN }} registry.meatbag.se
|
||||
- run: podman build -t meatbag/baseimage-alpine:latest .
|
||||
- run: podman push meatbag/baseimage-alpine registry.meatbag.se/meatbag/baseimage-alpine
|
||||
123
.github/CONTRIBUTING.md
vendored
123
.github/CONTRIBUTING.md
vendored
|
|
@ -1,123 +0,0 @@
|
|||
# Contributing to baseimage-alpine
|
||||
|
||||
## Gotchas
|
||||
|
||||
* While contributing make sure to make all your changes before creating a Pull Request, as our pipeline builds each commit after the PR is open.
|
||||
* Read, and fill the Pull Request template
|
||||
* If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
|
||||
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
|
||||
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://discord.gg/YWrKVTn)
|
||||
|
||||
## Common files
|
||||
|
||||
| File | Use case |
|
||||
| :----: | --- |
|
||||
| `Dockerfile` | Dockerfile used to build amd64 images |
|
||||
| `Dockerfile.aarch64` | Dockerfile used to build 64bit ARM architectures |
|
||||
| `Dockerfile.armhf` | Dockerfile used to build 32bit ARM architectures |
|
||||
| `Jenkinsfile` | This file is a product of our builder and should not be edited directly. This is used to build the image |
|
||||
| `jenkins-vars.yml` | This file is used to generate the `Jenkinsfile` mentioned above, it only affects the build-process |
|
||||
| `package_versions.txt` | This file is generated as a part of the build-process and should not be edited directly. It lists all the installed packages and their versions |
|
||||
| `README.md` | This file is a product of our builder and should not be edited directly. This displays the readme for the repository and image registries |
|
||||
| `readme-vars.yml` | This file is used to generate the `README.md` |
|
||||
|
||||
## Readme
|
||||
|
||||
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
|
||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-alpine/edit/master/readme-vars.yml).
|
||||
|
||||
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
|
||||
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io)
|
||||
|
||||
### Fixing typos or clarify the text in the readme
|
||||
|
||||
There are variables for multiple parts of the readme, the most common ones are:
|
||||
|
||||
| Variable | Description |
|
||||
| :----: | --- |
|
||||
| `project_blurb` | This is the short excerpt shown above the project logo. |
|
||||
| `app_setup_block` | This is the text that shows up under "Application Setup" if enabled |
|
||||
|
||||
### Parameters
|
||||
|
||||
The compose and run examples are also generated from these variables.
|
||||
|
||||
We have a [reference file](https://github.com/linuxserver/docker-jenkins-builder/blob/master/vars/_container-vars-blank) in our Jenkins Builder.
|
||||
|
||||
These are prefixed with `param_` for required parameters, or `opt_param` for optional parameters, except for `cap_add`.
|
||||
Remember to enable param, if currently disabled. This differs between parameters, and can be seen in the reference file.
|
||||
|
||||
Devices, environment variables, ports and volumes expects its variables in a certain way.
|
||||
|
||||
### Devices
|
||||
|
||||
```yml
|
||||
param_devices:
|
||||
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "For hardware transcoding" }
|
||||
opt_param_devices:
|
||||
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "For hardware transcoding" }
|
||||
```
|
||||
|
||||
### Environment variables
|
||||
|
||||
```yml
|
||||
param_env_vars:
|
||||
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
|
||||
opt_param_env_vars:
|
||||
- { env_var: "VERSION", env_value: "latest", desc: "Supported values are LATEST, PLEXPASS or a specific version number." }
|
||||
```
|
||||
|
||||
### Ports
|
||||
|
||||
```yml
|
||||
param_ports:
|
||||
- { external_port: "80", internal_port: "80", port_desc: "Application WebUI" }
|
||||
opt_param_ports:
|
||||
- { external_port: "80", internal_port: "80", port_desc: "Application WebUI" }
|
||||
```
|
||||
|
||||
### Volumes
|
||||
|
||||
```yml
|
||||
param_volumes:
|
||||
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Configuration files." }
|
||||
opt_param_volumes:
|
||||
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Configuration files." }
|
||||
```
|
||||
|
||||
### Testing template changes
|
||||
|
||||
After you make any changes to the templates, you can use our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) to have the files updated from the modified templates. Please use the command found under `Running Locally` [on this page](https://github.com/linuxserver/docker-jenkins-builder/blob/master/README.md) to generate them prior to submitting a PR.
|
||||
|
||||
## Dockerfiles
|
||||
|
||||
We use multiple Dockerfiles in our repos, this is because sometimes some CPU architectures needs different packages to work.
|
||||
If you are proposing additional packages to be added, ensure that you added the packages to all the Dockerfiles in alphabetical order.
|
||||
|
||||
### Testing your changes
|
||||
|
||||
```bash
|
||||
git clone https://github.com/linuxserver/docker-baseimage-alpine.git
|
||||
cd docker-baseimage-alpine
|
||||
docker build \
|
||||
--no-cache \
|
||||
--pull \
|
||||
-t linuxserver/baseimage-alpine:latest .
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||
|
||||
```bash
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
```
|
||||
|
||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||
|
||||
## Update the changelog
|
||||
|
||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-baseimage-alpine/tree/master/root), add an entry to the changelog
|
||||
|
||||
```yml
|
||||
changelogs:
|
||||
- { date: "DD.MM.YY:", desc: "Added some love to templates" }
|
||||
```
|
||||
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
|
|
@ -1,2 +0,0 @@
|
|||
github: linuxserver
|
||||
open_collective: linuxserver
|
||||
13
.github/ISSUE_TEMPLATE/config.yml
vendored
13
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1,13 +0,0 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Discord chat support
|
||||
url: https://discord.gg/YWrKVTn
|
||||
about: Realtime support / chat with the community and the team.
|
||||
|
||||
- name: Discourse discussion forum
|
||||
url: https://discourse.linuxserver.io
|
||||
about: Post on our community forum.
|
||||
|
||||
- name: Documentation
|
||||
url: https://docs.linuxserver.io
|
||||
about: Documentation - information about all of our containers.
|
||||
40
.github/ISSUE_TEMPLATE/issue.bug.md
vendored
40
.github/ISSUE_TEMPLATE/issue.bug.md
vendored
|
|
@ -1,40 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[][linuxserverurl]
|
||||
|
||||
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
|
||||
|
||||
<!--- Provide a general summary of the bug in the Title above -->
|
||||
|
||||
------------------------------
|
||||
|
||||
## Expected Behavior
|
||||
<!--- Tell us what should happen -->
|
||||
|
||||
## Current Behavior
|
||||
<!--- Tell us what happens instead of the expected behavior -->
|
||||
|
||||
## Steps to Reproduce
|
||||
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
||||
<!--- reproduce this bug. Include code to reproduce, if relevant -->
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
4.
|
||||
|
||||
## Environment
|
||||
**OS:**
|
||||
**CPU architecture:** x86_64/arm32/arm64
|
||||
**How docker service was installed:**
|
||||
<!--- ie. from the official docker repo, from the distro repo, nas OS provided, etc. -->
|
||||
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
||||
|
||||
## Command used to create docker container (run/create/compose/screenshot)
|
||||
<!--- Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container -->
|
||||
|
||||
## Docker logs
|
||||
<!--- Provide a full docker log, output of "docker logs baseimage-alpine" -->
|
||||
25
.github/ISSUE_TEMPLATE/issue.feature.md
vendored
25
.github/ISSUE_TEMPLATE/issue.feature.md
vendored
|
|
@ -1,25 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[][linuxserverurl]
|
||||
|
||||
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
|
||||
|
||||
<!--- If this acts as a feature request please ask yourself if this modification is something the whole userbase will benefit from --->
|
||||
<!--- If this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
|
||||
|
||||
<!--- Provide a general summary of the request in the Title above -->
|
||||
|
||||
------------------------------
|
||||
|
||||
## Desired Behavior
|
||||
<!--- Tell us what should happen -->
|
||||
|
||||
## Current Behavior
|
||||
<!--- Tell us what happens instead of the expected behavior -->
|
||||
|
||||
## Alternatives Considered
|
||||
<!--- Tell us what other options you have tried or considered -->
|
||||
43
.github/PULL_REQUEST_TEMPLATE.md
vendored
43
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
|
@ -1,43 +0,0 @@
|
|||
<!--- Provide a general summary of your changes in the Title above -->
|
||||
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[][linuxserverurl]
|
||||
|
||||
|
||||
<!--- Before submitting a pull request please check the following -->
|
||||
|
||||
<!--- If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR -->
|
||||
<!--- Ask yourself if this modification is something the whole userbase will benefit from, if this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
|
||||
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
|
||||
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
|
||||
<!--- We maintain a changelog of major revisions to the container at the end of readme-vars.yml in the root of this repository, please add your changes there if appropriate -->
|
||||
|
||||
|
||||
<!--- Coding guidelines: -->
|
||||
<!--- 1. Installed packages in the Dockerfiles should be in alphabetical order -->
|
||||
<!--- 2. Changes to Dockerfile should be replicated in Dockerfile.armhf and Dockerfile.aarch64 if applicable -->
|
||||
<!--- 3. Indentation style (tabs vs 4 spaces vs 1 space) should match the rest of the document -->
|
||||
<!--- 4. Readme is auto generated from readme-vars.yml, make your changes there -->
|
||||
|
||||
------------------------------
|
||||
|
||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||
|
||||
------------------------------
|
||||
|
||||
<!--- We welcome all PR’s though this doesn’t guarantee it will be accepted. -->
|
||||
|
||||
## Description:
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
## Benefits of this PR and context:
|
||||
<!--- Please explain why we should accept this PR. If this fixes an outstanding bug, please reference the issue # -->
|
||||
|
||||
## How Has This Been Tested?
|
||||
<!--- Please describe in detail how you tested your changes. -->
|
||||
<!--- Include details of your testing environment, and the tests you ran to -->
|
||||
<!--- see how your change affects other areas of the code, etc. -->
|
||||
|
||||
|
||||
## Source / References:
|
||||
<!--- Please include any forum posts/github links relevant to the PR -->
|
||||
16
.github/workflows/external_trigger.yml
vendored
16
.github/workflows/external_trigger.yml
vendored
|
|
@ -1,16 +0,0 @@
|
|||
name: External Trigger Main
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
external-trigger-master:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: External Trigger
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
echo "**** No external release, exiting ****"
|
||||
exit 0
|
||||
43
.github/workflows/external_trigger_scheduler.yml
vendored
43
.github/workflows/external_trigger_scheduler.yml
vendored
|
|
@ -1,43 +0,0 @@
|
|||
name: External Trigger Scheduler
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '52 * * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
external-trigger-scheduler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: External Trigger Scheduler
|
||||
run: |
|
||||
echo "**** Branches found: ****"
|
||||
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||
echo "**** Pulling the yq docker image ****"
|
||||
docker pull ghcr.io/linuxserver/yq
|
||||
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||
do
|
||||
br=$(echo "$br" | sed 's|origin/||g')
|
||||
echo "**** Evaluating branch ${br} ****"
|
||||
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/${br}/jenkins-vars.yml \
|
||||
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
|
||||
if [ "$br" == "$ls_branch" ]; then
|
||||
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
||||
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
|
||||
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
|
||||
curl -iX POST \
|
||||
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||
https://api.github.com/repos/linuxserver/docker-baseimage-alpine/actions/workflows/external_trigger.yml/dispatches
|
||||
else
|
||||
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||
fi
|
||||
else
|
||||
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
||||
fi
|
||||
done
|
||||
13
.github/workflows/greetings.yml
vendored
13
.github/workflows/greetings.yml
vendored
|
|
@ -1,13 +0,0 @@
|
|||
name: Greetings
|
||||
|
||||
on: [pull_request_target, issues]
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
|
||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
38
.github/workflows/package_trigger.yml
vendored
38
.github/workflows/package_trigger.yml
vendored
|
|
@ -1,38 +0,0 @@
|
|||
name: Package Trigger Main
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
package-trigger-master:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: Package Trigger
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_BASEIMAGE_ALPINE_MASTER }}" ]; then
|
||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_BASEIMAGE_ALPINE_MASTER is set; skipping trigger. ****"
|
||||
exit 0
|
||||
fi
|
||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
|
||||
exit 0
|
||||
fi
|
||||
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_BASEIMAGE_ALPINE_MASTER\". ****"
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine/job/master/buildWithParameters?PACKAGE_CHECK=true \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||
echo "**** Sleeping 10 seconds until job starts ****"
|
||||
sleep 10
|
||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||
buildurl="${buildurl%$'\r'}"
|
||||
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||
echo "**** Attempting to change the Jenkins job description ****"
|
||||
curl -iX POST \
|
||||
"${buildurl}submitDescription" \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"
|
||||
50
.github/workflows/package_trigger_scheduler.yml
vendored
50
.github/workflows/package_trigger_scheduler.yml
vendored
|
|
@ -1,50 +0,0 @@
|
|||
name: Package Trigger Scheduler
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '01 6 * * 2'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
package-trigger-scheduler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Package Trigger Scheduler
|
||||
run: |
|
||||
echo "**** Branches found: ****"
|
||||
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||
echo "**** Pulling the yq docker image ****"
|
||||
docker pull ghcr.io/linuxserver/yq
|
||||
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||
do
|
||||
br=$(echo "$br" | sed 's|origin/||g')
|
||||
echo "**** Evaluating branch ${br} ****"
|
||||
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/${br}/jenkins-vars.yml \
|
||||
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
|
||||
if [ "${br}" == "${ls_branch}" ]; then
|
||||
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
||||
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
|
||||
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
|
||||
triggered_branches="${triggered_branches}${br} "
|
||||
curl -iX POST \
|
||||
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||
https://api.github.com/repos/linuxserver/docker-baseimage-alpine/actions/workflows/package_trigger.yml/dispatches
|
||||
sleep 30
|
||||
else
|
||||
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||
fi
|
||||
else
|
||||
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
||||
fi
|
||||
done
|
||||
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||
echo "**** Notifying Discord ****"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Package Check Build(s) Triggered for baseimage-alpine** \n**Branch(es):** '"${triggered_branches}"' \n**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-baseimage-alpine/activity/"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
23
.github/workflows/stale.yml
vendored
23
.github/workflows/stale.yml
vendored
|
|
@ -1,23 +0,0 @@
|
|||
name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
|
||||
stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
|
||||
stale-issue-label: 'no-issue-activity'
|
||||
stale-pr-label: 'no-pr-activity'
|
||||
days-before-stale: 30
|
||||
days-before-close: 365
|
||||
exempt-issue-labels: 'awaiting-approval,work-in-progress'
|
||||
exempt-pr-labels: 'awaiting-approval,work-in-progress'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
133
Dockerfile
133
Dockerfile
|
|
@ -1,89 +1,104 @@
|
|||
FROM alpine:3.14 as rootfs-stage
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM alpine:3.20 AS rootfs-stage
|
||||
|
||||
# environment
|
||||
ENV REL=v3.15
|
||||
ENV ROOTFS=/root-out
|
||||
ENV REL=v3.21
|
||||
ENV ARCH=x86_64
|
||||
ENV MIRROR=http://dl-cdn.alpinelinux.org/alpine
|
||||
ENV PACKAGES=alpine-baselayout,\
|
||||
alpine-keys,\
|
||||
apk-tools,\
|
||||
busybox,\
|
||||
libc-utils,\
|
||||
xz
|
||||
libc-utils
|
||||
|
||||
# install packages
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
tzdata \
|
||||
xz
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
xz
|
||||
|
||||
# fetch builder script from gliderlabs
|
||||
# build rootfs
|
||||
RUN \
|
||||
curl -o \
|
||||
/mkimage-alpine.bash -L \
|
||||
https://raw.githubusercontent.com/gliderlabs/docker-alpine/master/builder/scripts/mkimage-alpine.bash && \
|
||||
chmod +x \
|
||||
/mkimage-alpine.bash && \
|
||||
./mkimage-alpine.bash && \
|
||||
mkdir /root-out && \
|
||||
tar xf \
|
||||
/rootfs.tar.xz -C \
|
||||
/root-out && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
mkdir -p "$ROOTFS/etc/apk" && \
|
||||
{ \
|
||||
echo "$MIRROR/$REL/main"; \
|
||||
echo "$MIRROR/$REL/community"; \
|
||||
} > "$ROOTFS/etc/apk/repositories" && \
|
||||
apk --root "$ROOTFS" --no-cache --keys-dir /etc/apk/keys add --arch $ARCH --initdb ${PACKAGES//,/ } && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
|
||||
# set version for s6 overlay
|
||||
ARG S6_OVERLAY_VERSION="3.2.0.2"
|
||||
ARG S6_OVERLAY_ARCH="x86_64"
|
||||
|
||||
# add s6 overlay
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
|
||||
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-noarch.tar.xz
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz /tmp
|
||||
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz
|
||||
|
||||
# add s6 optional symlinks
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz /tmp
|
||||
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz && unlink /root-out/usr/bin/with-contenv
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz /tmp
|
||||
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz
|
||||
|
||||
# Runtime stage
|
||||
FROM scratch
|
||||
COPY --from=rootfs-stage /root-out/ /
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG MODS_VERSION="v3"
|
||||
ARG PKG_INST_VERSION="v1"
|
||||
ARG LSIOWN_VERSION="v1"
|
||||
ARG WITHCONTENV_VERSION="v1"
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="TheLamer"
|
||||
|
||||
# set version for s6 overlay
|
||||
ARG OVERLAY_VERSION="v2.2.0.3"
|
||||
ARG OVERLAY_ARCH="amd64"
|
||||
|
||||
# add s6 overlay
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/
|
||||
RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer
|
||||
COPY patch/ /tmp/patch
|
||||
ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods"
|
||||
ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/package-install.${PKG_INST_VERSION}" "/etc/s6-overlay/s6-rc.d/init-mods-package-install/run"
|
||||
ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/lsiown.${LSIOWN_VERSION}" "/usr/bin/lsiown"
|
||||
ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/with-contenv.${WITHCONTENV_VERSION}" "/usr/bin/with-contenv"
|
||||
|
||||
# environment variables
|
||||
ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \
|
||||
HOME="/root" \
|
||||
TERM="xterm"
|
||||
HOME="/root" \
|
||||
TERM="xterm" \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \
|
||||
S6_VERBOSITY=1 \
|
||||
S6_STAGE2_HOOK=/docker-mods \
|
||||
VIRTUAL_ENV=/lsiopy \
|
||||
PATH="/lsiopy/bin:$PATH"
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
curl \
|
||||
patch \
|
||||
tar && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
procps \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/app \
|
||||
/config \
|
||||
/defaults && \
|
||||
mv /usr/bin/with-contenv /usr/bin/with-contenvb && \
|
||||
patch -u /etc/s6/init/init-stage2 -i /tmp/patch/etc/s6/init/init-stage2.patch && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
alpine-release \
|
||||
bash \
|
||||
ca-certificates \
|
||||
catatonit \
|
||||
coreutils \
|
||||
curl \
|
||||
findutils \
|
||||
jq \
|
||||
netcat-openbsd \
|
||||
procps-ng \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/app \
|
||||
/config \
|
||||
/defaults \
|
||||
/lsiopy && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
|
|
|||
|
|
@ -1,94 +1,104 @@
|
|||
FROM alpine:3.14 as rootfs-stage
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM alpine:3.20 AS rootfs-stage
|
||||
|
||||
# environment
|
||||
ENV REL=v3.15
|
||||
ENV ROOTFS=/root-out
|
||||
ENV REL=v3.21
|
||||
ENV ARCH=aarch64
|
||||
ENV MIRROR=http://dl-cdn.alpinelinux.org/alpine
|
||||
ENV PACKAGES=alpine-baselayout,\
|
||||
alpine-keys,\
|
||||
apk-tools,\
|
||||
busybox,\
|
||||
libc-utils,\
|
||||
xz
|
||||
libc-utils
|
||||
|
||||
# install packages
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
tzdata \
|
||||
xz
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
xz
|
||||
|
||||
# fetch builder script from gliderlabs
|
||||
# build rootfs
|
||||
RUN \
|
||||
curl -o \
|
||||
/mkimage-alpine.bash -L \
|
||||
https://raw.githubusercontent.com/gliderlabs/docker-alpine/master/builder/scripts/mkimage-alpine.bash && \
|
||||
chmod +x \
|
||||
/mkimage-alpine.bash && \
|
||||
./mkimage-alpine.bash && \
|
||||
mkdir /root-out && \
|
||||
tar xf \
|
||||
/rootfs.tar.xz -C \
|
||||
/root-out && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
mkdir -p "$ROOTFS/etc/apk" && \
|
||||
{ \
|
||||
echo "$MIRROR/$REL/main"; \
|
||||
echo "$MIRROR/$REL/community"; \
|
||||
} > "$ROOTFS/etc/apk/repositories" && \
|
||||
apk --root "$ROOTFS" --no-cache --keys-dir /etc/apk/keys add --arch $ARCH --initdb ${PACKAGES//,/ } && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
|
||||
# set version for s6 overlay
|
||||
ARG S6_OVERLAY_VERSION="3.2.0.2"
|
||||
ARG S6_OVERLAY_ARCH="aarch64"
|
||||
|
||||
# add s6 overlay
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
|
||||
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-noarch.tar.xz
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz /tmp
|
||||
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz
|
||||
|
||||
# add s6 optional symlinks
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz /tmp
|
||||
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz && unlink /root-out/usr/bin/with-contenv
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz /tmp
|
||||
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz
|
||||
|
||||
# Runtime stage
|
||||
FROM scratch
|
||||
COPY --from=rootfs-stage /root-out/ /
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG MODS_VERSION="v3"
|
||||
ARG PKG_INST_VERSION="v1"
|
||||
ARG LSIOWN_VERSION="v1"
|
||||
ARG WITHCONTENV_VERSION="v1"
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="TheLamer"
|
||||
|
||||
# set version for s6 overlay
|
||||
ARG OVERLAY_VERSION="v2.2.0.3"
|
||||
ARG OVERLAY_ARCH="aarch64"
|
||||
|
||||
# add s6 overlay
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/
|
||||
RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer
|
||||
COPY patch/ /tmp/patch
|
||||
ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods"
|
||||
ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/package-install.${PKG_INST_VERSION}" "/etc/s6-overlay/s6-rc.d/init-mods-package-install/run"
|
||||
ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/lsiown.${LSIOWN_VERSION}" "/usr/bin/lsiown"
|
||||
ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/with-contenv.${WITHCONTENV_VERSION}" "/usr/bin/with-contenv"
|
||||
|
||||
# environment variables
|
||||
ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \
|
||||
HOME="/root" \
|
||||
TERM="xterm"
|
||||
HOME="/root" \
|
||||
TERM="xterm" \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \
|
||||
S6_VERBOSITY=1 \
|
||||
S6_STAGE2_HOOK=/docker-mods \
|
||||
VIRTUAL_ENV=/lsiopy \
|
||||
PATH="/lsiopy/bin:$PATH"
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
curl \
|
||||
patch \
|
||||
tar && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
procps \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/app \
|
||||
/config \
|
||||
/defaults && \
|
||||
mv /usr/bin/with-contenv /usr/bin/with-contenvb && \
|
||||
patch -u /etc/s6/init/init-stage2 -i /tmp/patch/etc/s6/init/init-stage2.patch && \
|
||||
echo "**** add qemu ****" && \
|
||||
curl -o \
|
||||
/usr/bin/qemu-aarch64-static -L \
|
||||
"https://lsio-ci.ams3.digitaloceanspaces.com/qemu-aarch64-static" && \
|
||||
chmod +x /usr/bin/qemu-aarch64-static && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
alpine-release \
|
||||
bash \
|
||||
ca-certificates \
|
||||
catatonit \
|
||||
coreutils \
|
||||
curl \
|
||||
findutils \
|
||||
jq \
|
||||
netcat-openbsd \
|
||||
procps-ng \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/app \
|
||||
/config \
|
||||
/defaults \
|
||||
/lsiopy && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
|
|
|||
|
|
@ -1,96 +0,0 @@
|
|||
FROM alpine:3.14 as rootfs-stage
|
||||
|
||||
# environment
|
||||
ENV REL=v3.15
|
||||
ENV ARCH=armv7
|
||||
ENV MIRROR=http://dl-cdn.alpinelinux.org/alpine
|
||||
ENV PACKAGES=alpine-baselayout,\
|
||||
alpine-keys,\
|
||||
apk-tools,\
|
||||
busybox,\
|
||||
libc-utils,\
|
||||
xz
|
||||
|
||||
# install packages
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
tzdata \
|
||||
xz
|
||||
|
||||
# fetch builder script from gliderlabs
|
||||
RUN \
|
||||
curl -o \
|
||||
/mkimage-alpine.bash -L \
|
||||
https://raw.githubusercontent.com/gliderlabs/docker-alpine/master/builder/scripts/mkimage-alpine.bash && \
|
||||
chmod +x \
|
||||
/mkimage-alpine.bash && \
|
||||
./mkimage-alpine.bash && \
|
||||
mkdir /root-out && \
|
||||
tar xf \
|
||||
/rootfs.tar.xz -C \
|
||||
/root-out && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
|
||||
# Runtime stage
|
||||
FROM scratch
|
||||
COPY --from=rootfs-stage /root-out/ /
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="TheLamer"
|
||||
|
||||
# set version for s6 overlay
|
||||
ARG OVERLAY_VERSION="v2.2.0.3"
|
||||
ARG OVERLAY_ARCH="arm"
|
||||
|
||||
# add s6 overlay
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/
|
||||
RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer
|
||||
COPY patch/ /tmp/patch
|
||||
|
||||
# environment variables
|
||||
ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \
|
||||
HOME="/root" \
|
||||
TERM="xterm"
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
curl \
|
||||
patch \
|
||||
tar && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
procps \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/app \
|
||||
/config \
|
||||
/defaults && \
|
||||
mv /usr/bin/with-contenv /usr/bin/with-contenvb && \
|
||||
patch -u /etc/s6/init/init-stage2 -i /tmp/patch/etc/s6/init/init-stage2.patch && \
|
||||
echo "**** add qemu ****" && \
|
||||
curl -o \
|
||||
/usr/bin/qemu-arm-static -L \
|
||||
"https://lsio-ci.ams3.digitaloceanspaces.com/qemu-arm-static" && \
|
||||
chmod +x /usr/bin/qemu-arm-static && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
ENTRYPOINT ["/init"]
|
||||
883
Jenkinsfile
vendored
883
Jenkinsfile
vendored
File diff suppressed because it is too large
Load diff
31
README.md
31
README.md
|
|
@ -1,30 +1 @@
|
|||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||
<!-- Please read the https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/CONTRIBUTING.md -->
|
||||
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[forumurl]: https://forum.linuxserver.io
|
||||
[ircurl]: https://mibbit.com/?server=irc.libera.chat&channel=%23linuxserver.io
|
||||
[appurl]: https://alpinelinux.org
|
||||
|
||||
[][linuxserverurl]
|
||||
|
||||
## Contact information:-
|
||||
|
||||
| Type | Address/Details |
|
||||
| :---: | --- |
|
||||
| Discord | [Discord](https://discord.gg/YWrKVTn) |
|
||||
| IRC | libera at `#linuxserver.io` more information at:- [IRC][ircurl]
|
||||
| Forum | [LinuxServer.io forum][forumurl] |
|
||||
|
||||
|
||||
|
||||
|
||||
[](https://microbadger.com/images/lsiobase/alpine "Get your own image badge on microbadger.com")
|
||||
|
||||
[](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/Dockerfile)
|
||||
|
||||
A custom base image built with [Alpine linux][appurl] and [S6 overlay](https://github.com/just-containers/s6-overlay)..
|
||||
|
||||
The following line is only in this repo for loop testing:
|
||||
|
||||
- { date: "01.01.50:", desc: "I am the release message for this internal repo." }
|
||||
A custom base image built with [Alpine Linux](https://alpinelinux.org) and [s6-overlay](https://github.com/just-containers/s6-overlay).
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
project_name: docker-baseimage-alpine
|
||||
external_type: os
|
||||
release_type: stable
|
||||
release_tag: "3.15"
|
||||
release_tag: "3.21"
|
||||
ls_branch: master
|
||||
image_sbom: true
|
||||
image_provenance: true
|
||||
repo_vars:
|
||||
- BUILD_VERSION_ARG = 'OS'
|
||||
- LS_USER = 'linuxserver'
|
||||
|
|
@ -21,6 +23,6 @@ repo_vars:
|
|||
- CI_PORT='80'
|
||||
- CI_SSL='true'
|
||||
- CI_DELAY='30'
|
||||
- CI_DOCKERENV='TZ=US/Pacific'
|
||||
- CI_AUTH='user:password'
|
||||
- CI_DOCKERENV='LSIO_FIRST_PARTY=true'
|
||||
- CI_AUTH=''
|
||||
- CI_WEBPATH=''
|
||||
|
|
|
|||
|
|
@ -1,33 +1,51 @@
|
|||
alpine-baselayout-3.2.0-r18
|
||||
alpine-keys-2.4-r1
|
||||
apk-tools-2.12.7-r3
|
||||
bash-5.1.16-r0
|
||||
busybox-1.34.1-r4
|
||||
ca-certificates-20211220-r0
|
||||
ca-certificates-bundle-20211220-r0
|
||||
coreutils-9.0-r2
|
||||
libacl-2.2.53-r0
|
||||
libattr-2.5.1-r1
|
||||
libc-utils-0.7.2-r3
|
||||
libcrypto1.1-1.1.1l-r8
|
||||
libintl-0.21-r0
|
||||
libproc-3.3.17-r0
|
||||
libretls-3.3.4-r2
|
||||
libssl1.1-1.1.1l-r8
|
||||
linux-pam-1.5.2-r0
|
||||
musl-1.2.2-r7
|
||||
musl-utils-1.2.2-r7
|
||||
ncurses-libs-6.3_p20211120-r0
|
||||
ncurses-terminfo-base-6.3_p20211120-r0
|
||||
procps-3.3.17-r0
|
||||
readline-8.1.1-r0
|
||||
s6-ipcserver-2.11.0.0-r0
|
||||
scanelf-1.3.3-r0
|
||||
shadow-4.8.1-r1
|
||||
skalibs-2.11.0.0-r0
|
||||
ssl_client-1.34.1-r4
|
||||
tzdata-2021e-r0
|
||||
utmps-0.1.0.3-r0
|
||||
xz-5.2.5-r0
|
||||
xz-libs-5.2.5-r0
|
||||
zlib-1.2.11-r3
|
||||
NAME VERSION TYPE
|
||||
acl-libs 2.3.2-r1 apk
|
||||
alpine-baselayout 3.6.8-r1 apk
|
||||
alpine-baselayout-data 3.6.8-r1 apk
|
||||
alpine-keys 2.5-r0 apk
|
||||
alpine-release 3.21.3-r0 apk
|
||||
apk-tools 2.14.6-r3 apk
|
||||
bash 5.2.37-r0 apk
|
||||
brotli-libs 1.1.0-r2 apk
|
||||
busybox 1.37.0-r12 apk
|
||||
busybox-binsh 1.37.0-r12 apk
|
||||
c-ares 1.34.5-r0 apk
|
||||
ca-certificates 20241121-r1 apk
|
||||
ca-certificates-bundle 20241121-r1 apk
|
||||
catatonit 0.2.0-r0 apk
|
||||
coreutils 9.5-r2 apk
|
||||
coreutils-env 9.5-r2 apk
|
||||
coreutils-fmt 9.5-r2 apk
|
||||
coreutils-sha512sum 9.5-r2 apk
|
||||
curl 8.12.1-r1 apk
|
||||
findutils 4.10.0-r0 apk
|
||||
jq 1.7.1-r0 apk
|
||||
libattr 2.5.2-r2 apk
|
||||
libbsd 0.12.2-r0 apk
|
||||
libcrypto3 3.3.3-r0 apk
|
||||
libcurl 8.12.1-r1 apk
|
||||
libidn2 2.3.7-r0 apk
|
||||
libintl 0.22.5-r0 apk
|
||||
libmd 1.1.0-r0 apk
|
||||
libncursesw 6.5_p20241006-r3 apk
|
||||
libproc2 4.0.4-r2 apk
|
||||
libpsl 0.21.5-r3 apk
|
||||
libssl3 3.3.3-r0 apk
|
||||
libunistring 1.2-r0 apk
|
||||
linux-pam 1.6.1-r1 apk
|
||||
musl 1.2.5-r9 apk
|
||||
musl-utils 1.2.5-r9 apk
|
||||
ncurses-terminfo-base 6.5_p20241006-r3 apk
|
||||
netcat-openbsd 1.226.1.1-r0 apk
|
||||
nghttp2-libs 1.64.0-r0 apk
|
||||
oniguruma 6.9.9-r0 apk
|
||||
procps-ng 4.0.4-r2 apk
|
||||
readline 8.2.13-r0 apk
|
||||
scanelf 1.3.8-r1 apk
|
||||
shadow 4.16.0-r1 apk
|
||||
skalibs-libs 2.14.3.0-r0 apk
|
||||
ssl_client 1.37.0-r12 apk
|
||||
tzdata 2025b-r0 apk
|
||||
utmps-libs 0.1.2.3-r2 apk
|
||||
zlib 1.3.1-r2 apk
|
||||
zstd-libs 1.5.6-r2 apk
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
--- init-stage2 2021-01-20 20:21:41.628300700 -0600
|
||||
+++ init-stage2_new 2021-01-20 20:23:48.123677700 -0600
|
||||
@@ -17,6 +17,12 @@
|
||||
backtick -D 0 -n S6_READ_ONLY_ROOT { printcontenv S6_READ_ONLY_ROOT }
|
||||
importas -u S6_READ_ONLY_ROOT S6_READ_ONLY_ROOT
|
||||
|
||||
+# Docker Mods run logic
|
||||
+foreground
|
||||
+{
|
||||
+ /docker-mods
|
||||
+}
|
||||
+
|
||||
foreground
|
||||
{
|
||||
if
|
||||
|
|
@ -4,29 +4,22 @@
|
|||
project_name: baseimage-alpine
|
||||
full_custom_readme: |
|
||||
{% raw -%}
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[forumurl]: https://forum.linuxserver.io
|
||||
[ircurl]: https://mibbit.com/?server=irc.libera.chat&channel=%23linuxserver.io
|
||||
[appurl]: https://alpinelinux.org
|
||||
|
||||
[][linuxserverurl]
|
||||
[](https://linuxserver.io)
|
||||
|
||||
## Contact information:-
|
||||
|
||||
| Type | Address/Details |
|
||||
| :---: | --- |
|
||||
| Discord | [Discord](https://discord.gg/YWrKVTn) |
|
||||
| IRC | libera at `#linuxserver.io` more information at:- [IRC][ircurl]
|
||||
| Forum | [LinuxServer.io forum][forumurl] |
|
||||
| Discord | [Discord](https://linuxserver.io/discord) |
|
||||
| IRC | `#linuxserver.io` on irc.libera.chat |
|
||||
| Forum | [Discourse](https://discourse.linuxserver.io/) |
|
||||
|
||||
|
||||
|
||||
A custom base image built with [Alpine Linux](https://alpinelinux.org) and [s6-overlay](https://github.com/just-containers/s6-overlay).
|
||||
|
||||
[](https://microbadger.com/images/lsiobase/alpine "Get your own image badge on microbadger.com")
|
||||
|
||||
[](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/Dockerfile)
|
||||
|
||||
A custom base image built with [Alpine linux][appurl] and [S6 overlay](https://github.com/just-containers/s6-overlay)..
|
||||
- Support for using our base images in your own projects is provided on a Reasonable Endeavours basis, please see our [Support Policy](https://www.linuxserver.io/supportpolicy) for details.
|
||||
- There is no `latest` tag for any of our base images, by design. We often make breaking changes between versions, and we don't publish release notes like we do for the downstream images.
|
||||
- If you're intending to distribute an image using one of our bases, please read our [docs on container branding](https://docs.linuxserver.io/general/container-branding/) first.
|
||||
- Alpine releases are supported for 2 years, after which we will stop building new base images for that version.
|
||||
|
||||
The following line is only in this repo for loop testing:
|
||||
|
||||
|
|
|
|||
119
root/docker-mods
119
root/docker-mods
|
|
@ -1,119 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Exit if mods is not set
|
||||
if [ -z ${DOCKER_MODS+x} ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check for curl
|
||||
if [ ! -f /usr/bin/curl ] || [ ! -f /usr/bin/jq ]; then
|
||||
echo "[mod-init] Curl/JQ was not found on this system for Docker mods installing"
|
||||
if [ -f /usr/bin/apt ]; then
|
||||
## Ubuntu
|
||||
apt-get update
|
||||
apt-get install --no-install-recommends -y \
|
||||
curl \
|
||||
jq
|
||||
elif [ -f /sbin/apk ]; then
|
||||
# Alpine
|
||||
apk add --no-cache \
|
||||
curl \
|
||||
jq
|
||||
fi
|
||||
fi
|
||||
|
||||
## Functions
|
||||
|
||||
# Use different filtering depending on URL
|
||||
get_blob_sha () {
|
||||
if [[ $1 == "ghcr" ]]; then
|
||||
curl \
|
||||
--silent \
|
||||
--location \
|
||||
--request GET \
|
||||
--header "Authorization: Bearer $2" \
|
||||
$3 | jq -r '.layers[0].digest'
|
||||
else
|
||||
curl \
|
||||
--silent \
|
||||
--location \
|
||||
--request GET \
|
||||
--header "Authorization: Bearer $2" \
|
||||
$3 | jq -r '.fsLayers[0].blobSum'
|
||||
fi
|
||||
}
|
||||
|
||||
# Main run logic
|
||||
echo "[mod-init] Attempting to run Docker Modification Logic"
|
||||
IFS='|'
|
||||
DOCKER_MODS=(${DOCKER_MODS})
|
||||
for DOCKER_MOD in "${DOCKER_MODS[@]}"; do
|
||||
# Support alternative endpoints
|
||||
if [[ ${DOCKER_MOD} == ghcr.io/* ]] || [[ ${DOCKER_MOD} == linuxserver/* ]]; then
|
||||
DOCKER_MOD="${DOCKER_MOD#ghcr.io/*}"
|
||||
ENDPOINT="${DOCKER_MOD%%:*}"
|
||||
USERNAME="${DOCKER_MOD%%/*}"
|
||||
REPO="${ENDPOINT#*/}"
|
||||
TAG="${DOCKER_MOD#*:}"
|
||||
if [[ ${TAG} == "${DOCKER_MOD}" ]]; then
|
||||
TAG="latest"
|
||||
fi
|
||||
FILENAME="${USERNAME}.${REPO}.${TAG}"
|
||||
AUTH_URL="https://ghcr.io/token?scope=repository%3A${USERNAME}%2F${REPO}%3Apull"
|
||||
MANIFEST_URL="https://ghcr.io/v2/${ENDPOINT}/manifests/${TAG}"
|
||||
BLOB_URL="https://ghcr.io/v2/${ENDPOINT}/blobs/"
|
||||
MODE="ghcr"
|
||||
else
|
||||
ENDPOINT="${DOCKER_MOD%%:*}"
|
||||
USERNAME="${DOCKER_MOD%%/*}"
|
||||
REPO="${ENDPOINT#*/}"
|
||||
TAG="${DOCKER_MOD#*:}"
|
||||
if [[ ${TAG} == "${DOCKER_MOD}" ]]; then
|
||||
TAG="latest"
|
||||
fi
|
||||
FILENAME="${USERNAME}.${REPO}.${TAG}"
|
||||
AUTH_URL="https://auth.docker.io/token?service=registry.docker.io&scope=repository:${ENDPOINT}:pull"
|
||||
MANIFEST_URL="https://registry-1.docker.io/v2/${ENDPOINT}/manifests/${TAG}"
|
||||
BLOB_URL="https://registry-1.docker.io/v2/${ENDPOINT}/blobs/"
|
||||
MODE="dockerhub"
|
||||
fi
|
||||
# Kill off modification logic if any of the usernames are banned
|
||||
BLACKLIST=$(curl -s https://raw.githubusercontent.com/linuxserver/docker-mods/master/blacklist.txt)
|
||||
IFS=$'\n'
|
||||
BLACKLIST=(${BLACKLIST})
|
||||
for BANNED in "${BLACKLIST[@]}"; do
|
||||
if [ "${BANNED}" == "${USERNAME,,}" ]; then
|
||||
if [ -z ${RUN_BANNED_MODS+x} ]; then
|
||||
echo "[mod-init] ${DOCKER_MOD} is banned from use due to reported abuse aborting mod logic"
|
||||
exit 0
|
||||
else
|
||||
echo "[mod-init] You have chosen to run banned mods ${DOCKER_MOD} will be applied"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo "[mod-init] Applying ${DOCKER_MOD} files to container"
|
||||
# Get Dockerhub token for api operations
|
||||
TOKEN=\
|
||||
"$(curl \
|
||||
--silent \
|
||||
--header 'GET' \
|
||||
"${AUTH_URL}" \
|
||||
| jq -r '.token' \
|
||||
)"
|
||||
# Determine first and only layer of image
|
||||
SHALAYER=$(get_blob_sha "${MODE}" "${TOKEN}" "${MANIFEST_URL}")
|
||||
# Check if we have allready applied this layer
|
||||
if [ -f "/${FILENAME}" ] && [ "${SHALAYER}" == "$(cat /${FILENAME})" ]; then
|
||||
echo "[mod-init] ${DOCKER_MOD} at ${SHALAYER} has been previously applied skipping"
|
||||
else
|
||||
# Download and extract layer to /
|
||||
curl \
|
||||
--silent \
|
||||
--location \
|
||||
--request GET \
|
||||
--header "Authorization: Bearer ${TOKEN}" \
|
||||
"${BLOB_URL}${SHALAYER}" \
|
||||
| tar xz -C /
|
||||
echo ${SHALAYER} > "/${FILENAME}"
|
||||
fi
|
||||
done
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#! /bin/bash
|
||||
|
||||
if [[ "$(ls /var/run/s6/container_environment/ | xargs)" == *"FILE__"* ]]; then
|
||||
for FILENAME in /var/run/s6/container_environment/*; do
|
||||
if [[ "${FILENAME##*/}" == "FILE__"* ]]; then
|
||||
SECRETFILE=$(cat ${FILENAME})
|
||||
if [[ -f ${SECRETFILE} ]]; then
|
||||
FILESTRIP=${FILENAME//FILE__/}
|
||||
cat ${SECRETFILE} > ${FILESTRIP}
|
||||
echo "[env-init] ${FILESTRIP##*/} set from ${FILENAME##*/}"
|
||||
else
|
||||
echo "[env-init] cannot find secret in ${FILENAME##*/}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
MIGRATIONS_DIR="/migrations"
|
||||
MIGRATIONS_HISTORY="/config/.migrations"
|
||||
|
||||
echo "[migrations] started"
|
||||
|
||||
if [ ! -d $MIGRATIONS_DIR ]; then
|
||||
echo "[migrations] no migrations found"
|
||||
exit
|
||||
fi
|
||||
|
||||
for MIGRATION in $(ls -1 ${MIGRATIONS_DIR}/* | sort -n); do
|
||||
NAME="$(basename "${MIGRATION}")"
|
||||
if [ -f $MIGRATIONS_HISTORY ] && grep -Fxq "$NAME" $MIGRATIONS_HISTORY; then
|
||||
echo "[migrations] ${NAME}: skipped"
|
||||
continue
|
||||
fi
|
||||
echo "[migrations] ${NAME}: executing..."
|
||||
chmod +x $MIGRATION
|
||||
EXIT_CODE=$(/bin/bash ${MIGRATION}; echo $?)
|
||||
if [ $EXIT_CODE -ne 0 ]; then
|
||||
echo "[migrations] ${NAME}: failed with exit code $EXIT_CODE, contact support"
|
||||
exit $EXIT_CODE
|
||||
fi
|
||||
echo $NAME >> $MIGRATIONS_HISTORY
|
||||
echo "[migrations] ${NAME}: succeeded"
|
||||
done
|
||||
|
||||
echo "[migrations] done"
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if ([ -d "/config/custom-cont-init.d" ] && [ -n "$(find /config/custom-cont-init.d ! -user root)" ]) || ([ -d "/config/custom-services.d" ] && [ -n "$(find /config/custom-services.d ! -user root)" ]); then
|
||||
echo "**** Potential tampering with custom scripts/services detected ****"
|
||||
randstr=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-8};echo;)
|
||||
for folder in "/config/custom-cont-init.d" "/config/custom-services.d"; do
|
||||
if [ -d "${folder}" ]; then
|
||||
mv "${folder}" "${folder}.${randstr}"
|
||||
echo "**** Folder ${folder} is moved to ${folder}.${randstr} ****"
|
||||
fi
|
||||
done
|
||||
echo "**** The folders '/config/custom-cont-init.d' and '/config/custom-services.d'; and their contents need to all be owned by root to prevent root escalation inside the container!!! ****"
|
||||
mkdir -p /config/custom-cont-init.d /config/custom-services.d
|
||||
chown 0:0 /config/custom-cont-init.d /config/custom-services.d
|
||||
elif ([ -d "/config/custom-cont-init.d" ] && [ -n "$(find /config/custom-cont-init.d -perm -o+w)" ]) || ([ -d "/config/custom-services.d" ] && [ -n "$(find /config/custom-services.d -perm -o+w)" ]); then
|
||||
echo "**** The folders '/config/custom-cont-init.d' or '/config/custom-services.d'; or some of their contents have write permissions for others, which is a security risk. ****"
|
||||
echo "**** Please review the permissions of these two folders and their contents to make sure they are owned by root, and can only be modified by root. ****"
|
||||
fi
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
PUID=${PUID:-911}
|
||||
PGID=${PGID:-911}
|
||||
|
||||
groupmod -o -g "$PGID" abc
|
||||
usermod -o -u "$PUID" abc
|
||||
|
||||
echo '
|
||||
-------------------------------------
|
||||
_ ()
|
||||
| | ___ _ __
|
||||
| | / __| | | / \
|
||||
| | \__ \ | | | () |
|
||||
|_| |___/ |_| \__/
|
||||
|
||||
|
||||
Brought to you by linuxserver.io
|
||||
-------------------------------------'
|
||||
if [[ -f /donate.txt ]]; then
|
||||
echo '
|
||||
To support the app dev(s) visit:'
|
||||
cat /donate.txt
|
||||
fi
|
||||
echo '
|
||||
To support LSIO projects visit:
|
||||
https://www.linuxserver.io/donate/
|
||||
-------------------------------------
|
||||
GID/UID
|
||||
-------------------------------------'
|
||||
echo "
|
||||
User uid: $(id -u abc)
|
||||
User gid: $(id -g abc)
|
||||
-------------------------------------
|
||||
"
|
||||
|
||||
time32="$(date +%Y)"
|
||||
|
||||
if [[ "${time32}" == "1970" || "${time32}" == "1969" ]] && [ "$(uname -m)" == "armv7l" ]; then
|
||||
echo '
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
Your DockerHost is running an outdated version of libseccomp
|
||||
|
||||
To fix this, please visit https://docs.linuxserver.io/faq#libseccomp
|
||||
|
||||
Apps will not behave correctly without this
|
||||
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
'
|
||||
sleep infinity
|
||||
fi
|
||||
|
||||
chown abc:abc /app
|
||||
chown abc:abc /config
|
||||
chown abc:abc /defaults
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# create custom folders and secure permissions
|
||||
mkdir -p /config/{custom-cont-init.d,custom-services.d}
|
||||
chown -R 0:0 /config/{custom-cont-init.d,custom-services.d}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Directories
|
||||
SCRIPTS_DIR="/config/custom-cont-init.d"
|
||||
SERVICES_DIR="/config/custom-services.d"
|
||||
|
||||
# Remove all existing custom services before continuing to ensure
|
||||
# we aren't running anything the user may have removed
|
||||
if [ -n "$(/bin/ls -A /etc/services.d/custom-service-* 2>/dev/null)" ]; then
|
||||
echo "[custom-init] removing existing custom services..."
|
||||
rm -rf /etc/services.d/custom-service-*
|
||||
fi
|
||||
|
||||
# Make sure custom init directory exists and has files in it
|
||||
if ([ -e "${SCRIPTS_DIR}" ] && \
|
||||
[ -n "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]) || \
|
||||
([ -e "${SERVICES_DIR}" ] && \
|
||||
[ -n "$(/bin/ls -A ${SERVICES_DIR} 2>/dev/null)" ]); then
|
||||
if [ -n "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]; then
|
||||
echo "[custom-init] files found in ${SCRIPTS_DIR} executing"
|
||||
for SCRIPT in ${SCRIPTS_DIR}/*; do
|
||||
NAME="$(basename "${SCRIPT}")"
|
||||
if [ -f "${SCRIPT}" ]; then
|
||||
echo "[custom-init] ${NAME}: executing..."
|
||||
/bin/bash ${SCRIPT}
|
||||
echo "[custom-init] ${NAME}: exited $?"
|
||||
elif [ ! -f "${SCRIPT}" ]; then
|
||||
echo "[custom-init] ${NAME}: is not a file"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ -n "$(/bin/ls -A ${SERVICES_DIR} 2>/dev/null)" ]; then
|
||||
echo "[custom-init] service files found in ${SERVICES_DIR}"
|
||||
for SERVICE in ${SERVICES_DIR}/*; do
|
||||
NAME="$(basename "${SERVICE}")"
|
||||
if [ -f "${SERVICE}" ]; then
|
||||
echo "[custom-init] ${NAME}: service detected, copying..."
|
||||
mkdir -p /etc/services.d/custom-service-${NAME}/
|
||||
cp ${SERVICE} /etc/services.d/custom-service-${NAME}/run
|
||||
chmod +x /etc/services.d/custom-service-${NAME}/run
|
||||
echo "[custom-init] ${NAME}: copied"
|
||||
elif [ ! -f "${SERVICE}" ]; then
|
||||
echo "[custom-init] ${NAME}: is not a file"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
else
|
||||
echo "[custom-init] no custom files found exiting..."
|
||||
fi
|
||||
1
root/etc/s6-overlay/s6-rc.d/ci-service-check/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/ci-service-check/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/ci-service-check/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/ci-service-check/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
echo "[ls.io-init] done."
|
||||
3
root/etc/s6-overlay/s6-rc.d/init-adduser/branding
Normal file
3
root/etc/s6-overlay/s6-rc.d/init-adduser/branding
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
───────
|
||||
meatbag
|
||||
───────
|
||||
57
root/etc/s6-overlay/s6-rc.d/init-adduser/run
Executable file
57
root/etc/s6-overlay/s6-rc.d/init-adduser/run
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
PUID=${PUID:-911}
|
||||
PGID=${PGID:-911}
|
||||
|
||||
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
|
||||
USERHOME=$(grep abc /etc/passwd | cut -d ":" -f6)
|
||||
usermod -d "/root" abc
|
||||
|
||||
groupmod -o -g "${PGID}" abc
|
||||
usermod -o -u "${PUID}" abc
|
||||
|
||||
usermod -d "${USERHOME}" abc
|
||||
fi
|
||||
|
||||
if { [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; } || [[ ! ${LSIO_FIRST_PARTY} = "true" ]]; then
|
||||
cat /etc/s6-overlay/s6-rc.d/init-adduser/branding
|
||||
else
|
||||
cat /run/branding
|
||||
fi
|
||||
|
||||
if [[ -f /donate.txt ]]; then
|
||||
echo '
|
||||
To support the app dev(s) visit:'
|
||||
cat /donate.txt
|
||||
fi
|
||||
echo '
|
||||
To support LSIO projects visit:
|
||||
https://www.linuxserver.io/donate/
|
||||
|
||||
───────────────────────────────────────
|
||||
GID/UID
|
||||
───────────────────────────────────────'
|
||||
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
|
||||
echo "
|
||||
User UID: $(id -u abc)
|
||||
User GID: $(id -g abc)
|
||||
───────────────────────────────────────"
|
||||
else
|
||||
echo "
|
||||
User UID: $(stat /run -c %u)
|
||||
User GID: $(stat /run -c %g)
|
||||
───────────────────────────────────────"
|
||||
fi
|
||||
if [[ -f /build_version ]]; then
|
||||
cat /build_version
|
||||
echo '
|
||||
───────────────────────────────────────
|
||||
'
|
||||
fi
|
||||
|
||||
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
|
||||
lsiown abc:abc /app
|
||||
lsiown abc:abc /config
|
||||
lsiown abc:abc /defaults
|
||||
fi
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-adduser/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-adduser/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-adduser/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-adduser/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-adduser/run
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config-end/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config-end/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config-end/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config-end/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the end of the downstream image init process
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the start of the downstream image init process
|
||||
33
root/etc/s6-overlay/s6-rc.d/init-crontab-config/run
Executable file
33
root/etc/s6-overlay/s6-rc.d/init-crontab-config/run
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
for cron_user in abc root; do
|
||||
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
|
||||
if [[ -f "/etc/crontabs/${cron_user}" ]]; then
|
||||
lsiown "${cron_user}":"${cron_user}" "/etc/crontabs/${cron_user}"
|
||||
crontab -u "${cron_user}" "/etc/crontabs/${cron_user}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "/defaults/crontabs/${cron_user}" ]]; then
|
||||
# make folders
|
||||
mkdir -p \
|
||||
/config/crontabs
|
||||
|
||||
# if crontabs do not exist in config
|
||||
if [[ ! -f "/config/crontabs/${cron_user}" ]]; then
|
||||
# copy crontab from system
|
||||
if crontab -l -u "${cron_user}" >/dev/null 2>&1; then
|
||||
crontab -l -u "${cron_user}" >"/config/crontabs/${cron_user}"
|
||||
fi
|
||||
|
||||
# if crontabs still do not exist in config (were not copied from system)
|
||||
# copy crontab from image defaults (using -n, do not overwrite an existing file)
|
||||
cp -n "/defaults/crontabs/${cron_user}" /config/crontabs/
|
||||
fi
|
||||
|
||||
# set permissions and import user crontabs
|
||||
lsiown "${cron_user}":"${cron_user}" "/config/crontabs/${cron_user}"
|
||||
crontab -u "${cron_user}" "/config/crontabs/${cron_user}"
|
||||
fi
|
||||
done
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-crontab-config/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-crontab-config/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-crontab-config/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-crontab-config/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-crontab-config/run
|
||||
22
root/etc/s6-overlay/s6-rc.d/init-custom-files/run
Executable file
22
root/etc/s6-overlay/s6-rc.d/init-custom-files/run
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Directories
|
||||
SCRIPTS_DIR="/custom-cont-init.d"
|
||||
|
||||
# Make sure custom init directory exists and has files in it
|
||||
if [[ -e "${SCRIPTS_DIR}" ]] && [[ -n "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]]; then
|
||||
echo "[custom-init] Files found, executing"
|
||||
for SCRIPT in "${SCRIPTS_DIR}"/*; do
|
||||
NAME="$(basename "${SCRIPT}")"
|
||||
if [[ -f "${SCRIPT}" ]]; then
|
||||
echo "[custom-init] ${NAME}: executing..."
|
||||
/bin/bash "${SCRIPT}"
|
||||
echo "[custom-init] ${NAME}: exited $?"
|
||||
elif [[ ! -f "${SCRIPT}" ]]; then
|
||||
echo "[custom-init] ${NAME}: is not a file"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "[custom-init] No custom files found, skipping..."
|
||||
fi
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-custom-files/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-custom-files/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-custom-files/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-custom-files/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-custom-files/run
|
||||
19
root/etc/s6-overlay/s6-rc.d/init-envfile/run
Executable file
19
root/etc/s6-overlay/s6-rc.d/init-envfile/run
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if find /run/s6/container_environment/FILE__* -maxdepth 1 > /dev/null 2>&1; then
|
||||
for FILENAME in /run/s6/container_environment/FILE__*; do
|
||||
SECRETFILE=$(cat "${FILENAME}")
|
||||
if [[ -f ${SECRETFILE} ]]; then
|
||||
FILESTRIP=${FILENAME//FILE__/}
|
||||
if [[ $(tail -n1 "${SECRETFILE}" | wc -l) != 0 ]]; then
|
||||
echo "[env-init] Your secret: ${FILENAME##*/}"
|
||||
echo " contains a trailing newline and may not work as expected"
|
||||
fi
|
||||
cat "${SECRETFILE}" >"${FILESTRIP}"
|
||||
echo "[env-init] ${FILESTRIP##*/} set from ${FILENAME##*/}"
|
||||
else
|
||||
echo "[env-init] cannot find secret in ${FILENAME##*/}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-envfile/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-envfile/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-envfile/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-envfile/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-envfile/run
|
||||
32
root/etc/s6-overlay/s6-rc.d/init-migrations/run
Executable file
32
root/etc/s6-overlay/s6-rc.d/init-migrations/run
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
MIGRATIONS_DIR="/migrations"
|
||||
MIGRATIONS_HISTORY="/config/.migrations"
|
||||
|
||||
echo "[migrations] started"
|
||||
|
||||
if [[ ! -d ${MIGRATIONS_DIR} ]]; then
|
||||
echo "[migrations] no migrations found"
|
||||
exit
|
||||
fi
|
||||
|
||||
for MIGRATION in $(find ${MIGRATIONS_DIR}/* | sort -n); do
|
||||
NAME="$(basename "${MIGRATION}")"
|
||||
if [[ -f ${MIGRATIONS_HISTORY} ]] && grep -Fxq "${NAME}" ${MIGRATIONS_HISTORY}; then
|
||||
echo "[migrations] ${NAME}: skipped"
|
||||
continue
|
||||
fi
|
||||
echo "[migrations] ${NAME}: executing..."
|
||||
# Execute migration script in a subshell to prevent it from modifying the current environment
|
||||
("${MIGRATION}")
|
||||
EXIT_CODE=$?
|
||||
if [[ ${EXIT_CODE} -ne 0 ]]; then
|
||||
echo "[migrations] ${NAME}: failed with exit code ${EXIT_CODE}, contact support"
|
||||
exit "${EXIT_CODE}"
|
||||
fi
|
||||
echo "${NAME}" >>${MIGRATIONS_HISTORY}
|
||||
echo "[migrations] ${NAME}: succeeded"
|
||||
done
|
||||
|
||||
echo "[migrations] done"
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-migrations/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-migrations/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-migrations/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-migrations/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-migrations/run
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods-end/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods-end/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods-end/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods-end/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the end of the mod init process
|
||||
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods-package-install/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods-package-install/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-mods-package-install/run
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the start of the mod init process
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-os-end/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-os-end/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-os-end/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-os-end/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the end of the mod init process
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-services/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-services/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-services/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-services/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it just signals that services can start
|
||||
15
root/etc/s6-overlay/s6-rc.d/svc-cron/run
Executable file
15
root/etc/s6-overlay/s6-rc.d/svc-cron/run
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if builtin command -v crontab >/dev/null 2>&1 && [[ -n "$(crontab -l -u abc 2>/dev/null || true)" || -n "$(crontab -l -u root 2>/dev/null || true)" ]]; then
|
||||
if builtin command -v busybox >/dev/null 2>&1 && [[ $(busybox || true) =~ [[:space:]](crond)([,]|$) ]]; then
|
||||
exec busybox crond -f -S -l 5
|
||||
elif [[ -f /usr/bin/apt ]] && [[ -f /usr/sbin/cron ]]; then
|
||||
exec /usr/sbin/cron -f -L 5
|
||||
else
|
||||
echo "**** cron not found ****"
|
||||
sleep infinity
|
||||
fi
|
||||
else
|
||||
sleep infinity
|
||||
fi
|
||||
1
root/etc/s6-overlay/s6-rc.d/svc-cron/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-cron/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
longrun
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#! /bin/bash
|
||||
if [[ -f /var/run/s6/container_environment/UMASK ]] && [[ "$(pwdx $$)" =~ "/run/s6/services/" ]]; then
|
||||
umask $(cat /var/run/s6/container_environment/UMASK)
|
||||
exec /usr/bin/with-contenvb "$@"
|
||||
else
|
||||
exec /usr/bin/with-contenvb "$@"
|
||||
fi
|
||||
Loading…
Reference in a new issue