You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-11-19 00:22:57 +03:00
Add proper UTF-8 locale (thus enabling UTF-8 defaults) and update a few minor idioms that take the image from ~244.1 MB down to ~213.6 MB
This commit is contained in:
@@ -4,24 +4,31 @@ FROM debian:wheezy
|
||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
||||
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
# grab gosu for easy step-down from root
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu \
|
||||
&& apt-get purge -y --auto-remove curl
|
||||
|
||||
RUN curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu
|
||||
# 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
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||
|
||||
ENV PG_MAJOR 8.4
|
||||
ENV PG_VERSION 8.4.22-1.pgdg70+1
|
||||
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
|
||||
| apt-key add - ED6D65271AACF0FF15D123036FB2A1C265FFB764
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y postgresql-common \
|
||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||
&& apt-get install -y \
|
||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||
|
||||
|
||||
@@ -4,24 +4,31 @@ FROM debian:wheezy
|
||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
||||
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
# grab gosu for easy step-down from root
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu \
|
||||
&& apt-get purge -y --auto-remove curl
|
||||
|
||||
RUN curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu
|
||||
# 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
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||
|
||||
ENV PG_MAJOR 9.0
|
||||
ENV PG_VERSION 9.0.18-1.pgdg70+1
|
||||
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
|
||||
| apt-key add - ED6D65271AACF0FF15D123036FB2A1C265FFB764
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y postgresql-common \
|
||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||
&& apt-get install -y \
|
||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||
|
||||
|
||||
@@ -4,24 +4,31 @@ FROM debian:wheezy
|
||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
||||
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
# grab gosu for easy step-down from root
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu \
|
||||
&& apt-get purge -y --auto-remove curl
|
||||
|
||||
RUN curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu
|
||||
# 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
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||
|
||||
ENV PG_MAJOR 9.1
|
||||
ENV PG_VERSION 9.1.14-1.pgdg70+1
|
||||
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
|
||||
| apt-key add - ED6D65271AACF0FF15D123036FB2A1C265FFB764
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y postgresql-common \
|
||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||
&& apt-get install -y \
|
||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||
|
||||
|
||||
@@ -4,24 +4,31 @@ FROM debian:wheezy
|
||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
||||
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
# grab gosu for easy step-down from root
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu \
|
||||
&& apt-get purge -y --auto-remove curl
|
||||
|
||||
RUN curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu
|
||||
# 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
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||
|
||||
ENV PG_MAJOR 9.2
|
||||
ENV PG_VERSION 9.2.9-1.pgdg70+1
|
||||
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
|
||||
| apt-key add - ED6D65271AACF0FF15D123036FB2A1C265FFB764
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y postgresql-common \
|
||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||
&& apt-get install -y \
|
||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||
|
||||
|
||||
@@ -4,24 +4,31 @@ FROM debian:wheezy
|
||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
||||
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
# grab gosu for easy step-down from root
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu \
|
||||
&& apt-get purge -y --auto-remove curl
|
||||
|
||||
RUN curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu
|
||||
# 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
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||
|
||||
ENV PG_MAJOR 9.3
|
||||
ENV PG_VERSION 9.3.5-1.pgdg70+1
|
||||
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
|
||||
| apt-key add - ED6D65271AACF0FF15D123036FB2A1C265FFB764
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y postgresql-common \
|
||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||
&& apt-get install -y \
|
||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||
|
||||
|
||||
@@ -4,24 +4,31 @@ FROM debian:wheezy
|
||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
||||
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
# grab gosu for easy step-down from root
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu \
|
||||
&& apt-get purge -y --auto-remove curl
|
||||
|
||||
RUN curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu
|
||||
# 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
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||
|
||||
ENV PG_MAJOR 9.4
|
||||
ENV PG_VERSION 9.4~beta2-1.pgdg70+1
|
||||
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
|
||||
| apt-key add - ED6D65271AACF0FF15D123036FB2A1C265FFB764
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y postgresql-common \
|
||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||
&& apt-get install -y \
|
||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||
|
||||
|
||||
@@ -4,24 +4,31 @@ FROM debian:wheezy
|
||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
||||
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
# grab gosu for easy step-down from root
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu \
|
||||
&& apt-get purge -y --auto-remove curl
|
||||
|
||||
RUN curl -o /usr/local/bin/gosu -SL 'https://github.com/tianon/gosu/releases/download/1.1/gosu' \
|
||||
&& chmod +x /usr/local/bin/gosu
|
||||
# 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
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||
|
||||
ENV PG_MAJOR %%PG_MAJOR%%
|
||||
ENV PG_VERSION %%PG_VERSION%%
|
||||
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
|
||||
| apt-key add - ED6D65271AACF0FF15D123036FB2A1C265FFB764
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y postgresql-common \
|
||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||
&& apt-get install -y \
|
||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION
|
||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||
|
||||
|
||||
Reference in New Issue
Block a user