Skip to content
Snippets Groups Projects
Commit 9620d7d8 authored by Pierre-Gilles Levallois's avatar Pierre-Gilles Levallois
Browse files

change image building

parent d0975288
Branches
Tags
2 merge requests!3Launch script,!2Refactoring : all scripts in Dockerfiles/python/scripts
Pipeline #44269 passed
# ARB::Base de données postgis pour le calcul du calque de plantabilité # # ARB::Base de données postgis pour le calcul du calque de plantabilité
FROM postgis/postgis # FROM postgis/postgis
# Create another dir for pgdata than /var/postgresql/data/ # # Create another dir for pgdata than /var/postgresql/data/
# see http://heidloff.net/article/deploying-postgres-on-openshift/ # # see http://heidloff.net/article/deploying-postgres-on-openshift/
USER root # USER root
# ENV PGDATA=/var/lib/postgresql/data/pgdata
# # RUN mkdir arb-data
# RUN groupadd non-root-postgres-group && \
# useradd non-root-postgres-user --group non-root-postgres-group && \
# mkdir -p $PGDATA && \
# chown -R non-root-postgres-user:non-root-postgres-group /$PGDATA && \
# chmod 777 /$PGDATA
# # Entry point.
# COPY ./db-init/ /docker-entrypoint-initdb.d/
# RUN ls -l /docker-entrypoint-initdb.d/
ENV PGDATA=/var/lib/postgresql/data/pgdata # USER non-root-postgres
# RUN mkdir arb-data
RUN groupadd non-root-postgres-group && \ FROM mdillon/postgis:10-alpine
useradd non-root-postgres-user --group non-root-postgres-group && \
mkdir -p $PGDATA && \ USER root
chown -R non-root-postgres-user:non-root-postgres-group /$PGDATA && \
chmod 777 /$PGDATA
# Entry point. RUN chown postgres:0 -R ${PGDATA}
COPY ./db-init/ /docker-entrypoint-initdb.d/
RUN ls -l /docker-entrypoint-initdb.d/ USER postgres
USER non-root-postgres COPY ./db-init/ /docker-entrypoint-initdb.d/
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment