Skip to content

Commit

Permalink
s6 v3 Upgrade (#63)
Browse files Browse the repository at this point in the history
- Cleaned up old armv6 references
- Updated to s6 v3 format for service launch
- Altered run command to use -Z for non-interactive launch (this was missing piece for my primary issue in upgrading)
- Simplified binary naming in dockerfile and launch scripts
- Enhanced logging verbosity with extra details and formatting
  • Loading branch information
1activegeek authored Sep 11, 2024
1 parent 2451aa5 commit 74eb7e6
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 91 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ RUN apt-get update && apt-get install -y \
COPY root/ /

# Grab latest version of the app, extract binaries, cleanup tmp dir
RUN if [ "$ARCH_VAR" = "amd64" ]; then ARCH_VAR=linux-x86_64; elif [ "$ARCH_VAR" = "arm64" ]; then ARCH_VAR=linux-aarch64; elif [ "$ARCH_VAR" = "arm" ]; then ARCH_VAR=linux-arm; fi \
RUN if [ "$ARCH_VAR" = "amd64" ]; then ARCH_VAR=linux-x86_64; elif [ "$ARCH_VAR" = "arm64" ]; then ARCH_VAR=linux-aarch64; fi \
&& curl -s https://api.github.com/repos/philippe44/AirConnect/releases/latest | grep browser_download_url | cut -d '"' -f 4 | xargs curl -L -o airconnect.zip \
&& unzip airconnect.zip -d /tmp/ \
&& mv /tmp/airupnp-$ARCH_VAR /bin/airupnp-$ARCH_VAR \
&& mv /tmp/aircast-$ARCH_VAR /bin/aircast-$ARCH_VAR \
&& chmod +x /bin/airupnp-$ARCH_VAR \
&& chmod +x /bin/aircast-$ARCH_VAR \
&& mv /tmp/airupnp-$ARCH_VAR /usr/bin/airupnp-docker \
&& mv /tmp/aircast-$ARCH_VAR /usr/bin/aircast-docker \
&& chmod +x /usr/bin/airupnp-docker \
&& chmod +x /usr/bin/aircast-docker \
&& rm -r /tmp/*

ENTRYPOINT ["/init"]
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@ If you like what I've created, please consider contributing:
<a href="https://ko-fi.com/shawnmix"><img src="https://img.shields.io/badge/Coffee-Buy%20me%20a%20Coffee-grey?style=for-the-badge&logo=buy-me-a-coffee&labelColor=000000"></a>
<br>

# If you're reading this ...

Please validate/test the dev version of this container image. I had to restructure the container on 7/15 due to upstream updates, leading to a complete rebuild of the startup/supervisor daemon system.

Steps:
1. Run the current `latest` tag to ensure a working setup.
2. Use the `dev` tag to validate its functionality.
3. Report any errors or confirm it works by commenting on https://github.com/1activegeek/docker-airconnect/issues/62, including any special configurations used (ENV VARs, configs, etc.).

I plan to run this for 2 weeks and push `dev` to `latest` by the end of July. Thank you for your help.

# docker-airconnect
AirConnect container for turning Chromecast into Airplay targets
On DockerHub: https://hub.docker.com/r/1activegeek/airconnect
Expand Down Expand Up @@ -94,7 +83,7 @@ Unfortunately the base I use, has deprecated ARMv7 support. My only alternative
<br>

# Changelog
**2024-07-15:** Large change to update to support for s6 v3 since v2 has been deprecated by upstream container image provider. Simplified launch scritp, simplified service files, easier separation of both services, less "stuff" overall. Currently testing in Dev branch on Docker Hub.
**2024-07-15:** Large change to update to support for s6 v3 since v2 has been deprecated by upstream container image provider. Simplified launch scritp, simplified service files, easier separation of both services, less "stuff" overall.
**2023-10-21:** Package maintainer changed the release asset output, had to move from tarball to zip package. No major change should be experienced as the output is still the same. Also added link in docs to an ARMv7 repo for those using older devices stuck on ARMv7 release maintained by [sidevesh](https://github.com/sidevesh). <br>
**2023-07-08:** The LS.io team has officially deprecated building ARMv7 base images. Had to deprecate this support as well. Attempted to comment out in case changes happen in the future to remedy this. <br>
**2022-11-28:** Some recent updates to handle changes by the original developer in formatting for binary file names. More efficient workflow runs as well. Added in output of tags for AirConnect versions, allowing you to specifically use a specific version of AirConnect. <br>
Expand Down
59 changes: 0 additions & 59 deletions root/etc/cont-init.d/30-install

This file was deleted.

16 changes: 16 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-aircast/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/with-contenv bash

echo "[AirConnect-AIRCAST] Launching AIRCAST ..."
# Check for VAR - default, kill, custom
if [ -z "$AIRCAST_VAR" ]; then
echo "[AirConnect-AIRCAST] AIRCAST_VAR is NOT present, launching with standard launch variables"
exec /usr/bin/aircast-docker -Z
elif [ "$AIRCAST_VAR" = "kill" ]; then
echo "[AirConnect-AIRCAST] AIRCAST_VAR set to kill, skipping aircast service launch"
exit 0
else
echo "[AirConnect-AIRCAST] AIRCAST_VAR is present, launching with custom launch variables: $AIRCAST_VAR"
exec /usr/bin/aircast-docker -Z $AIRCAST_VAR
fi

echo "[AirConnect-AIRCAST] AIRCAST launch sequence complete ..."
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-aircast/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-aircast/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/svc-aircast/run
16 changes: 16 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-airupnp/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/with-contenv bash

echo "[AirConnect-AIRUPNP] Launching AIRUPNP ..."
# Check for VAR - default, kill, custom
if [ -z "$AIRUPNP_VAR" ]; then
echo "[AirConnect-AIRUPNP] AIRUPNP_VAR is NOT present, launching with standard launch variables"
exec /usr/bin/airupnp-docker -Z -l 1000:2000
elif [ "$AIRUPNP_VAR" = "kill" ]; then
echo "[AirConnect-AIRUPNP] AIRUPNP_VAR set to kill, skipping AIRUPNP service launch"
exit 0
else
echo "[AirConnect-AIRUPNP] AIRUPNP_VAR is present, launching with custom launch variables: $AIRUPNP_VAR"
exec /usr/bin/airupnp-docker -Z $AIRUPNP_VAR
fi

echo "[AirConnect-AIRUPNP] AIRUPNP launch sequence complete ..."
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-airupnp/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-airupnp/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/svc-airupnp/run
Empty file.
Empty file.
3 changes: 0 additions & 3 deletions root/etc/services.d/airconnect/run

This file was deleted.

12 changes: 0 additions & 12 deletions root/etc/supervisord.conf

This file was deleted.

0 comments on commit 74eb7e6

Please sign in to comment.