Commit 989c4f0c authored by Cresson Remi's avatar Cresson Remi
Browse files

Update Dockerfile

parent 82ea5103
No related merge requests found
Pipeline #44204 passed with stage
in 2 minutes and 7 seconds
Showing with 3 additions and 22 deletions
+3 -22
...@@ -2,10 +2,6 @@ FROM centos/postgresql-95-centos7 as pg ...@@ -2,10 +2,6 @@ FROM centos/postgresql-95-centos7 as pg
LABEL maintainer="David Bitner / Remi Cresson" LABEL maintainer="David Bitner / Remi Cresson"
ENV POSTGIS_MAJOR 3
ENV PGUSER postgres
ENV PGDATABASE postgres
ENV PGHOST localhost
ENV \ ENV \
PYTHONUNBUFFERED=1 \ PYTHONUNBUFFERED=1 \
PYTHONFAULTHANDLER=1 \ PYTHONFAULTHANDLER=1 \
...@@ -17,14 +13,6 @@ USER root ...@@ -17,14 +13,6 @@ USER root
RUN \ RUN \
yum install -y \ yum install -y \
git \ git \
gnupg \
apt-transport-https \
debian-archive-keyring \
software-properties-common \
postgresql-$PG_MAJOR-pgtap \
postgresql-$PG_MAJOR-partman \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
build-essential \ build-essential \
python3 \ python3 \
python3-pip \ python3-pip \
...@@ -33,15 +21,11 @@ RUN pip3 install -U pip setuptools packaging \ ...@@ -33,15 +21,11 @@ RUN pip3 install -U pip setuptools packaging \
&& pip3 install -U psycopg2-binary \ && pip3 install -U psycopg2-binary \
&& pip3 install -U psycopg[binary] \ && pip3 install -U psycopg[binary] \
&& pip3 install -U migra[pg] \ && pip3 install -U migra[pg] \
&& yum remove -y apt-transport-https \
&& yum -y autoremove \ && yum -y autoremove \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
EXPOSE 5432 EXPOSE 5432
RUN mkdir -p /docker-entrypoint-initdb.d
RUN echo "#!/bin/bash \n unset PGHOST \n pypgstac migrate" >/docker-entrypoint-initdb.d/initpgstac.sh && chmod +x /docker-entrypoint-initdb.d/initpgstac.sh
RUN git clone https://github.com/stac-utils/pgstac \ RUN git clone https://github.com/stac-utils/pgstac \
&& cd pgstac/pypgstac \ && cd pgstac/pypgstac \
&& sed -i 's/python_requires=">=3.7"/python_requires=">=3.6"/g' setup.py \ && sed -i 's/python_requires=">=3.7"/python_requires=">=3.6"/g' setup.py \
...@@ -51,9 +35,6 @@ RUN git clone https://github.com/stac-utils/pgstac \ ...@@ -51,9 +35,6 @@ RUN git clone https://github.com/stac-utils/pgstac \
ENV POSTGRESQL_USER=username ENV POSTGRESQL_USER=username
ENV POSTGRESQL_PASSWORD=password ENV POSTGRESQL_PASSWORD=password
ENV POSTGRESQL_DB=postgis ENV POSTGRESQL_DATABASE=postgis
ENV PGUSER=username
ENV PGPASSWORD=password USER postgres
ENV PGHOST=localhost
ENV PGDATABASE=postgis
USER 1001
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment