Important - if you are using ansible restricted, change the "from" image name from "postgres11base" to "postgres11restricted"
Create a Dockerfile with the following content:
#Start dockerfile
FROM bulabu/postgres11base:latest
COPY id_rsa /root/.ssh
COPY id_rsa.pub /root/.ssh
COPY config /root/.ssh
COPY known_hosts /root/.ssh
RUN chmod 700 /root/.ssh/id_rsa
RUN mkdir /home/postgres
COPY id_rsa /var/lib/postgresql/.ssh
COPY id_rsa.pub /var/lib/postgresql/.ssh
COPY config /var/lib/postgresql/.ssh
COPY known_hosts /var/lib/postgresql/.ssh
RUN chmod 700 /var/lib/postgresql/.ssh/id_rsa
RUN chown -R postgres:postgres /var/lib/postgresql
#End Dockerfile
Copy your personal id_rsa, id_rsa.pub, known_hosts and config into the same directory as the Dockerfile. (while in the Dockerfile directory run cp ~/.ssh/* .)
docker build -t avisodb11 .
docker run -e "institution=<institution acronym>" -p <local_port>:5432 --name <institution>database avisodb11
Connect to postgres via the local port set above
Content type
Image
Digest
Size
129 MB
Last updated
about 6 years ago
docker pull bulabu/postgres11base