s6-rootfs/README.md

54 lines
1.3 KiB
Markdown
Raw Normal View History

2022-01-14 21:54:59 +01:00
### S6-overlay rootfs
2022-09-14 01:54:54 +02:00
The simplest and fastest way to get S6 supervisor in your image
2025-03-02 00:12:15 +01:00
This docker image packages s6 supervisor overlay based on https://github.com/just-containers/s6-overlay releases.
2025-03-01 23:53:31 +01:00
NOTE: GitHub Actions builds are currently broken. Images are, however manually built, so you should be still getting latest version.
2022-09-14 01:54:54 +02:00
### Usage
```Docker
2023-04-11 12:43:59 +02:00
COPY --from=ghcr.io/n0rthernl1ghts/s6-rootfs:latest ["/", "/"]
2022-09-14 01:54:54 +02:00
```
or with fixed version:
```Docker
2025-03-02 00:12:15 +01:00
COPY --from=ghcr.io/n0rthernl1ghts/s6-rootfs:3.2.0.2 ["/", "/"]
2022-09-14 01:54:54 +02:00
```
That's it!
2025-03-01 23:51:46 +01:00
Note: We have moved to `ghcr.io`. Docker hub `docker.io/nlss/s6-rootfs` builds are discontinued.<br/>
2023-04-11 12:43:59 +02:00
2022-09-14 01:54:54 +02:00
###### Recommended way to integrate with your image (example)
```Docker
# ---------------------
# Build root filesystem
# ---------------------
FROM scratch AS rootfs
# Copy over base files
COPY ["./rootfs", "/"]
# Install S6
2025-03-02 00:12:15 +01:00
COPY --from=ghcr.io/n0rthernl1ghts/s6-rootfs:3.2.0.2 ["/", "/"]
2022-09-14 01:54:54 +02:00
# ---------------------
# Build image
# ---------------------
FROM alpine:latest
COPY --from=rootfs ["/", "/"]
RUN apk add --update --no-cache nano
# S6 configuration - not required
# See: https://github.com/just-containers/s6-overlay#customizing-s6-overlay-behaviour
ENV S6_KEEP_ENVS6_KEEP_ENV=1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
ENV S6_CMD_RECEIVE_SIGNALS=1
# Important, this is required for S6 to work
ENTRYPOINT ["/init"]
2022-09-14 01:54:54 +02:00
```