2017-09-21 10:49:37 -05:00
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
|
|
|
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
|
|
|
|
# This software is released under the PostgreSQL Licence
|
|
|
|
#
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# Get the basics out of the way
|
|
|
|
FROM centos:latest
|
|
|
|
|
|
|
|
LABEL name="pgAdmin 4" \
|
|
|
|
vendor="The pgAdmin Development Team" \
|
|
|
|
license="PostgreSQL"
|
|
|
|
|
|
|
|
# We only need the web/ directory, and a few other things
|
|
|
|
COPY web /var/www/pgadmin
|
|
|
|
COPY requirements.txt /var/www/pgadmin
|
|
|
|
|
|
|
|
# Install everything we need. Use easy_install to get pip, to avoid setting up EPEL
|
2017-10-12 04:12:55 -05:00
|
|
|
RUN yum install -y python-setuptools python-devel httpd mod_wsgi mod_ssl gcc
|
2017-09-21 10:49:37 -05:00
|
|
|
RUN easy_install pip
|
2017-10-12 04:12:55 -05:00
|
|
|
RUN pip install j2cli
|
2017-09-21 10:49:37 -05:00
|
|
|
|
|
|
|
# Now install the Python runtime dependencies
|
|
|
|
RUN pip install -r /var/www/pgadmin/requirements.txt
|
|
|
|
|
2017-10-12 04:12:55 -05:00
|
|
|
# Create required directories for config
|
|
|
|
|
|
|
|
|
2017-09-21 10:49:37 -05:00
|
|
|
# Create required directories for running
|
|
|
|
RUN mkdir -p /var/log/pgadmin
|
|
|
|
RUN chown -R apache /var/log/pgadmin
|
|
|
|
RUN mkdir -p /var/lib/pgadmin
|
|
|
|
RUN chown -R apache /var/lib/pgadmin
|
2017-10-12 04:12:55 -05:00
|
|
|
RUN mkdir -p /certs
|
|
|
|
RUN chown -R apache /certs
|
|
|
|
RUN chmod 700 /certs
|
2017-09-21 10:49:37 -05:00
|
|
|
|
|
|
|
# Apache config time
|
2017-10-12 04:12:55 -05:00
|
|
|
RUN mkdir -p /templates
|
|
|
|
COPY pgadmin4.conf.j2 /templates/
|
2017-09-21 10:49:37 -05:00
|
|
|
COPY entry.sh /
|
|
|
|
|
|
|
|
# Finally, remove packages we only needed for building
|
|
|
|
RUN yum -y remove gcc cpp glibc-devel glibc-headers kernel-headers libgomp libmpc mpfr
|
|
|
|
|
|
|
|
# Default config options
|
|
|
|
ENV PGADMIN_DEFAULT_EMAIL container@pgadmin.org
|
|
|
|
ENV PGADMIN_DEFAULT_PASSWORD Conta1ner
|
2017-10-12 04:12:55 -05:00
|
|
|
ENV PGADMIN_ENABLE_TLS False
|
|
|
|
ENV PGADMIN_SERVER_NAME pgadmin4
|
2017-09-21 10:49:37 -05:00
|
|
|
|
|
|
|
EXPOSE 80 443
|
|
|
|
|
|
|
|
# Start the service
|
|
|
|
ENTRYPOINT ["/bin/bash", "/entry.sh"]
|