Skip to content

Commit e84a921

Browse files
authored
Generate en_US.UTF-8 locale in Ruby base image (#6)
Heroku apps migrated from slug to container deploys carry a LANG=en_US.UTF-8 config var. On Debian slim this locale doesn't exist, causing Ruby to silently fall back to US-ASCII encoding.
1 parent 5459153 commit e84a921

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ruby/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ RUN apt-get update -qq \
1212
git \
1313
libpq-dev \
1414
libyaml-dev \
15+
locales \
1516
pkg-config \
1617
postgresql-client \
18+
&& sed -i '/en_US.UTF-8/s/^# //' /etc/locale.gen \
19+
&& locale-gen \
1720
&& rm -rf /var/lib/apt/lists /var/cache/apt/archives
1821

1922
# Non-root user for downstream runtime stages

0 commit comments

Comments
 (0)