You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-11-19 00:22:57 +03:00
Update to Debian Stretch (slim)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# vim:set ft=dockerfile:
|
||||
FROM debian:stretch
|
||||
FROM debian:stretch-slim
|
||||
|
||||
RUN set -ex; \
|
||||
if ! command -v gpg > /dev/null; then \
|
||||
@@ -29,8 +29,15 @@ RUN set -x \
|
||||
&& apt-get purge -y --auto-remove ca-certificates wget
|
||||
|
||||
# make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default
|
||||
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
|
||||
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||
RUN set -eux; \
|
||||
if [ -f /etc/dpkg/dpkg.cfg.d/docker ]; then \
|
||||
# if this file exists, we're likely in "debian:xxx-slim", and locales are thus being excluded so we need to remove that exclusion (since we need locales)
|
||||
grep -q '/usr/share/locale' /etc/dpkg/dpkg.cfg.d/docker; \
|
||||
sed -ri '/\/usr\/share\/locale/d' /etc/dpkg/dpkg.cfg.d/docker; \
|
||||
! grep -q '/usr/share/locale' /etc/dpkg/dpkg.cfg.d/docker; \
|
||||
fi; \
|
||||
apt-get update; apt-get install -y locales; rm -rf /var/lib/apt/lists/*; \
|
||||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
RUN mkdir /docker-entrypoint-initdb.d
|
||||
|
||||
Reference in New Issue
Block a user