FROM sutty/daemonize:latest AS build MAINTAINER "f " RUN echo /home/builder/packages/home > /etc/apk/repositories RUN apk add --no-cache daemonize FROM sutty/monit:latest ENV PGBASE /var/lib/postgresql ENV PGDATA $PGBASE/11/data ENV LANG en_US.utf8 ENV PGUSER sutty ENV PGDB sutty ENV PGVER 11 RUN apk add --no-cache postgresql postgresql-contrib COPY --from=build /usr/sbin/daemonize /usr/sbin/daemonize COPY ./postgresql.sh /usr/local/bin/postgresql COPY ./monit.conf /etc/monit.d/postgresql.conf RUN chmod 750 /usr/local/bin/postgresql EXPOSE 5432 VOLUME $PGBASE