Skip to content

Commit

Permalink
Switch to new S6 service configuration (#82)
Browse files Browse the repository at this point in the history
* Add basic structure and deps

* Move run and finish scripts

* Add type

* Add exec perms

* Move labels to build.json

* Show labels in tests

* Tidy up dockerfile
  • Loading branch information
lildude authored Oct 29, 2024
1 parent e152eb4 commit e2b2ae4
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ jobs:
--${{ matrix.arch }} \
--target /data/ \
--addon
- name: Image labels
run: |
docker inspect ghcr.io/lildude/ha-addon-ghostfolio-${{ matrix.arch }} --format='{{json .Config.Labels}}' | jq
13 changes: 2 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,23 @@ RUN apt-get update && apt-get install -y \
&& S6_ARCH="${BUILD_ARCH}" \
&& if [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; \
elif [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \
&& rm -rf /var/lib/apt/lists/* \
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" | tar xpJ -C / \
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" | tar xpJ -C / \
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz" | tar Jxp -C / \
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz" | tar Jxp -C / \
&& mkdir -p /etc/fix-attrs.d \
&& mkdir -p /etc/services.d \
&& mkdir -p /tmp/bashio \
&& curl -Ls "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | tar xz --strip 1 -C /tmp/bashio \
&& mv /tmp/bashio/lib /usr/lib/bashio \
&& apt purge -y xz-utils \
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
&& rm -rf /tmp/bashio \
&& rm -rf /var/lib/apt/lists/* /tmp/* \
&& npm install -g npm@latest

COPY rootfs /
RUN chmod a+x /etc/services.d/*/run /etc/services.d/*/finish
USER node

ENTRYPOINT ["/init"]

LABEL \
org.opencontainers.image.title="Home Assistant Add-on: Ghostfolio" \
org.opencontainers.image.description="Privacy-first, open source dashboard for your personal finances." \
org.opencontainers.image.source="https://github.com/lildude/ha-addon-ghostfolio/" \
org.opencontainers.image.licenses="MIT"

HEALTHCHECK \
--interval=10s \
--retries=5 \
Expand Down
9 changes: 9 additions & 0 deletions build.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,14 @@
},
"codenotary": {
"signer": "[email protected]"
},
"labels":{
"maintainer": "Colin Seymour (https://github.com/lildude)",
"org.opencontainers.image.authors": "Colin Seymour (https://github.com/lildude)",
"org.opencontainers.image.description": "Privacy-first, open source dashboard for your personal finances.",
"org.opencontainers.image.documentation": "https://github.com/lildude/ha-addon-ghostfolio/blob/main/DOCS.md",
"org.opencontainers.image.licenses": "MIT",
"org.opencontainers.image.source": "https://github.com/lildude/ha-addon-ghostfolio/",
"org.opencontainers.image.title": "Home Assistant Add-on: Ghostolio"
}
}
Empty file.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions rootfs/etc/s6-overlay/s6-rc.d/nginx/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
Empty file.

0 comments on commit e2b2ae4

Please sign in to comment.