Skip to content

Commit 483f282

Browse files
computatoroxpa
authored andcommitted
chore: use gettext-envsubst alpine package instead of workaround
1 parent 0aa20e6 commit 483f282

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

Dockerfile-alpine-slim.template

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,8 @@ RUN set -x \
7777
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
7878
&& if [ -n "$tempDir" ]; then rm -rf "$tempDir"; fi \
7979
&& if [ -f "/etc/apk/keys/abuild-key.rsa.pub" ]; then rm -f /etc/apk/keys/abuild-key.rsa.pub; fi \
80-
# Bring in gettext so we can get `envsubst`, then throw
81-
# the rest away. To do this, we need to install `gettext`
82-
# then move `envsubst` out of the way so `gettext` can
83-
# be deleted completely, then move `envsubst` back.
84-
&& apk add --no-cache --virtual .gettext gettext \
85-
&& mv /usr/bin/envsubst /tmp/ \
86-
\
87-
&& runDeps="$( \
88-
scanelf --needed --nobanner /tmp/envsubst \
89-
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
90-
| sort -u \
91-
| xargs -r apk info --installed \
92-
| sort -u \
93-
)" \
94-
&& apk add --no-cache $runDeps \
95-
&& apk del --no-network .gettext \
96-
&& mv /tmp/envsubst /usr/local/bin/ \
80+
# Add `envsubst` for templating environment variables
81+
&& apk add --no-cache gettext-envsubst \
9782
# Bring in tzdata so users could set the timezones through the environment
9883
# variables
9984
&& apk add --no-cache tzdata \

0 commit comments

Comments
 (0)