Skip to content

Commit 5abb945

Browse files
committed
fix linebreaks in secrets
1 parent ef3a073 commit 5abb945

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jc21/alpine-nginx-full:node
1+
FROM --platform=${TARGETPLATFORM:-linux/amd64} jc21/alpine-nginx-full:node
22
LABEL maintainer="Jamie Curnow <[email protected]>"
33

44
ENV SUPPRESS_NO_CONFIG_WARNING=1

docker/rootfs/etc/cont-init.d/01_envfile.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ for FILENAME in $(find /var/run/s6/container_environment/ | grep "__FILE$"); do
1919

2020
# ... and set value to contents of secretfile
2121
# since s6 uses text files, this is effectively "export ..."
22-
cat $(${SECRETFILE} | xargs) > ${STRIPFILE}
22+
# cat ${SECRETFILE} > ${STRIPFILE}
23+
cat $(${SECRETFILE} | sed "s/[^\w.-]+//g") > ${STRIPFILE}
2324
echo "[secret-init] Set ${STRIPFILE} to $(cat ${STRIPFILE})" # DEBUG - rm for prod!"
2425
echo "[secret-init] Success! ${STRIPFILE} set from ${FILENAME}"
2526

0 commit comments

Comments
 (0)