Skip to content

Commit e0aec6e

Browse files
committed
Switch to new version of docker-env-secrets
1 parent b21d557 commit e0aec6e

File tree

5 files changed

+4
-18
lines changed

5 files changed

+4
-18
lines changed

Dockerfile

+2-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ RUN set -eux \
5454
&& apk add --update --no-cache bash rsync \
5555
&& /tmp/setup-unit.sh
5656

57-
# Download init-docker-secrets service script from gist
58-
ADD --chmod=0777 ["https://gist.githubusercontent.com/xZero707/bd8dd4795b8266d9639ed0cdd9d81f82/raw/13d3134880a2ce16c00b9b33450c05c34d0e0619/run.sh", "/rootfs-build/etc/s6-overlay/s6-rc.d/init-docker-secrets/run"]
59-
57+
# Install init-docker-secrets service
58+
COPY --from=ghcr.io/n0rthernl1ghts/docker-env-secrets:latest ["/", "/rootfs-build/"]
6059

6160

6261
################################################

rootfs/etc/s6-overlay/s6-rc.d/init-docker-secrets/run

-11
This file was deleted.

rootfs/etc/s6-overlay/s6-rc.d/init-docker-secrets/type

-1
This file was deleted.

rootfs/etc/s6-overlay/s6-rc.d/init-docker-secrets/up

-1
This file was deleted.

rootfs/etc/s6-overlay/s6-rc.d/svc-unitd/run

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ main() {
1111
# This is for legacy support for versions prior to 1.30.0
1212
if [ -d "/opt/unit" ] && [ -x "/opt/unit/sbin/unitd" ]; then
1313
echo "Legacy Unit installation detected, starting Unit from /opt/unit"
14-
s6-envdir /run/secrets_normalized /opt/unit/sbin/unitd --no-daemon --tmp "/tmp" --state "/var/lib/unit/state" --modules "/opt/unit/modules" --control "unix:${unitSocket}"
14+
exec /opt/unit/sbin/unitd --no-daemon --tmp "/tmp" --state "/var/lib/unit/state" --modules "/opt/unit/modules" --control "unix:${unitSocket}"
1515
return
1616
fi
1717

18-
s6-envdir /run/secrets_normalized /usr/local/sbin/unitd --no-daemon --control "unix:${unitSocket}"
18+
exec /usr/local/sbin/unitd --no-daemon --control "unix:${unitSocket}"
1919
}
2020

2121
main

0 commit comments

Comments
 (0)