f85c3c3e by Adam Heath

Importing into a fresh repository.

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