diff --git a/docker/Dockerfile b/docker/Dockerfile index 84899b4..94eed15 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,29 +1,29 @@ -FROM debian:buster +FROM debian:bullseye MAINTAINER Guillaume Anciaux RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y postgresql && apt-get clean -y && rm -r /var/lib/apt/lists/* # Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.3`` package when it was ``apt-get installed`` USER postgres RUN /etc/init.d/postgresql start &&\ psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\ createdb -O docker docker &&\ psql --command "CREATE USER blackdynamite WITH PASSWORD '';" &&\ createdb -O blackdynamite blackdynamite RUN /etc/init.d/postgresql stop # Adjust PostgreSQL configuration so that remote connections to the # database are possible. RUN find /etc/postgresql RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/11/main/pg_hba.conf # And add ``listen_addresses`` to ``/etc/postgresql/11/main/postgresql.conf`` RUN echo "listen_addresses='*'" >> /etc/postgresql/11/main/postgresql.conf # Expose the PostgreSQL port EXPOSE 5432:5432 # Set the default command to run when starting the container CMD ["/usr/lib/postgresql/11/bin/postgres", "-D", "/var/lib/postgresql/11/main", "-c", "config_file=/etc/postgresql/11/main/postgresql.conf"]