f85c3c3e by Adam Heath

Importing into a fresh repository.

1 parent d2f10335
1 FROM docker.brainfood.com/dumb-init
2
3 ADD /overlay/ /
4
5 RUN ["apt-docker", \
6 "-y", "install", "postgresql-9.4", \
7 ";" ]
8
9 RUN ["save-data-dir", "/var/lib/postgresql", "postgresql-server" ]
10
11 EXPOSE 5432
1 version: '2'
2
3 services:
4 build:
5 image: docker.brainfood.com/postgresql-server
6 build:
7 context: .
8 args:
9 - http_proxy
10 - https_proxy
11
1 #!/bin/bash
2
3 set -e
4 data_dir=/var/lib/postgresql
5
6 if [[ -d $data_dir ]]; then
7 declare -a files=(
8 $(find "$data_dir" -mindepth 1 -maxdepth 1 -not -name lost+found 2>/dev/null)
9 )
10 if [[ ${#files[*]} -eq 0 ]]; then
11 tar -zxf /var/lib/docker-init/data/postgresql-server.data.tar.gz -C "$data_dir"
12 fi
13 fi
14