Skip to content

Commit 3a6b69a

Browse files
committed
Added suggestion from @absentio to fix envsubst issue where it shouldn't substitute variables that are not set from an envvar.
1 parent fe2afd6 commit 3a6b69a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ ADD static /www/static
162162
EXPOSE 1935
163163
EXPOSE 80
164164

165-
CMD /bin/sh -c "envsubst" < /etc/nginx/nginx.conf.template > \
165+
CMD /bin/sh -c envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < \
166+
/etc/nginx/nginx.conf.template > \
166167
/etc/nginx/nginx.conf && \
167168
nginx

0 commit comments

Comments
 (0)