Re: Introduction + noob question -- where can I see the latest effort?

From: Joseph Ferguson <joe(at)infosiftr(dot)com>
To: Harry Percival <harry(at)pythonanywhere(dot)com>
Cc: Postgres-Docker Mailing List <pgsql-pkg-docker(at)postgresql(dot)org>, Developers <developers(at)pythonanywhere(dot)com>
Subject: Re: Introduction + noob question -- where can I see the latest effort?
Date: 2014-08-01 16:59:48
Message-ID: CAF3-kPE5Z5uqTn2=u4HjmzX6sbU6Pkp5phizQFZUi6P_6sk3bQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-docker

Hi and welcome.

On Fri, Aug 1, 2014 at 6:30 AM, Harry Percival <harry(at)pythonanywhere(dot)com> wrote:
> My noob question is: where can we see the latest progress? Is there a
> dockerfile or a github repo or is it already on the public docker container
> repository thing?

https://github.com/docker-library/postgres/ is where the official
postgres images are managed. Previously we were compiling from
source, but now it uses the packages from postgresql.org, which makes
it simpler to have all the current versions. It is available on the
hub as postgres.

> Here's what we've got so far:
> https://gist.github.com/hjwp/56972b110c969ee70628

A few minor suggestions:
(1) RUN apt-get update && apt-get install -y package package; That
way you get a natural cache bust if you change the list of packages.
It could be formatted as follows:

RUN apt-get update \
&& apt-get install -y -q postgresql-9.4 postgresql-client-9.4
postgresql-contrib-9.4 \
&& apt-get install -y -q postgresql-plpython-9.4 \
&& ...
or
RUN apt-get update && apt-get install ...
RUN apt-get update && apt-get install ...
or
RUN apt-get update && apt-get install -y -q \
autoconf \
build-essential \
postgresql-9.4 \
postgresql-client-9.4 \
...

(2) Combine multiple RUN lines so that you can clean up unnecessary
files. I would change `RUN wget RUN tar RUN ./configure...` to `RUN
wget | tar && cd && ./configure && make && make install` with some new
lines and backslashes for readability. That way the tar does not get
permanently saved into a layer of the image. Even a `RUN rm ...tar.gz`
would just add another layer and the tar would still take space in the
layer stack.

> One thing that may be of interest is that we've decided to try and use 9.4.
> As you'll see from the Dockerfile, that involves a fair bit of compiling
> from source (if you want Postgis).

I would suggest sticking with a stable version of postgres rather than
the beta. And it should make things simpler for you.

- Joe Ferguson :: joe(at)infosiftr(dot)com
InfoSiftr :: Vice President of Programming

In response to

Browse pgsql-pkg-docker by date

  From Date Subject
Next Message Magnus Persson 2014-08-04 22:08:40 Overriding configuration
Previous Message Harry Percival 2014-08-01 12:30:57 Introduction + noob question -- where can I see the latest effort?