Commit e8b13032 authored by Romain Loth's avatar Romain Loth

install: minor fix Dockerfile locale setup + comments

parent f6998bed
...@@ -9,6 +9,7 @@ MAINTAINER ISCPIF <gargantext@iscpif.fr> ...@@ -9,6 +9,7 @@ MAINTAINER ISCPIF <gargantext@iscpif.fr>
USER root USER root
### Update and install base dependencies ### Update and install base dependencies
RUN echo "############ DEBIAN LIBS ###############"
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y \ apt-get install -y \
apt-utils ca-certificates locales \ apt-utils ca-certificates locales \
...@@ -19,33 +20,37 @@ RUN apt-get update && \ ...@@ -19,33 +20,37 @@ RUN apt-get update && \
postgresql-9.5 postgresql-client-9.5 postgresql-contrib-9.5 postgresql-9.5 postgresql-client-9.5 postgresql-contrib-9.5
RUN echo "############ DEBIAN LIBS ###############"
### Configure timezone and locale ### Configure timezone and locale
RUN echo "Europe/Paris" > /etc/timezone && \ RUN echo "########### LOCALES & TZ #################"
dpkg-reconfigure -f noninteractive tzdata && \ RUN echo "Europe/Paris" > /etc/timezone
sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \ ENV TZ "Europe/Paris"
RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \ sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \
echo 'LANG="fr_FR.UTF-8"' > /etc/default/locale && \
dpkg-reconfigure --frontend=noninteractive locales && \ dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=fr_FR.UTF-8 echo 'LANG="fr_FR.UTF-8"' > /etc/default/locale
ENV LANG fr_FR.UTF-8
ENV LANGUAGE fr_FR.UTF-8
ENV LC_ALL fr_FR.UTF-8
RUN echo "########### LOCALES & TZ #################"
### Install main dependencies and python packages based on Debian distrib ### Install main dependencies and python packages based on Debian distrib
RUN echo "############# PYTHON DEPENDENCIES ###############"
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
libxml2-dev xml-core libgfortran-5-dev \ libxml2-dev xml-core libgfortran-5-dev \
libpq-dev \ libpq-dev \
python3.5 \ python3.5 \
python3-dev \ python3-dev \
# for numpy, pandas and numpyperf
python3-six python3-numpy python3-setuptools \ python3-six python3-numpy python3-setuptools \
# ^for numpy, pandas and numpyperf
python3-numexpr \ python3-numexpr \
#python dependencies # python dependencies
python3-pip \ python3-pip \
# for lxml # for lxml
libxml2-dev libxslt-dev libxml2-dev libxslt-dev
#libxslt1-dev zlib1g-dev #libxslt1-dev zlib1g-dev
RUN echo "############# PYTHON DEPENDENCIES ###############"
#UPDATE AND CLEAN # UPDATE AND CLEAN
RUN apt-get update && apt-get autoclean &&\ RUN apt-get update && apt-get autoclean &&\
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
#NB: removing /var/lib will avoid to significantly fill up your /var/ folder on your native system #NB: removing /var/lib will avoid to significantly fill up your /var/ folder on your native system
...@@ -65,9 +70,8 @@ ADD psql_configure.sh / ...@@ -65,9 +70,8 @@ ADD psql_configure.sh /
ADD django_configure.sh / ADD django_configure.sh /
RUN . /env_3-5/bin/activate && pip3 install -r requirements.txt && \ RUN . /env_3-5/bin/activate && pip3 install -r requirements.txt && \
pip3 install git+https://github.com/zzzeek/sqlalchemy.git@rel_1_1 &&\ pip3 install git+https://github.com/zzzeek/sqlalchemy.git@rel_1_1 && \
python3 -m nltk.downloader averaged_perceptron_tagger -d /usr/local/share/nltk_data; python3 -m nltk.downloader averaged_perceptron_tagger -d /usr/local/share/nltk_data
# nltk.data.path.append('path_to_nltk_data')
RUN chown gargantua:gargantua -R /env_3-5 RUN chown gargantua:gargantua -R /env_3-5
...@@ -81,6 +85,4 @@ RUN echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf ...@@ -81,6 +85,4 @@ RUN echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf
EXPOSE 5432 8000 EXPOSE 5432 8000
VOLUME ["/srv/",] # VOLUME ["/srv/",]
Markdown is supported
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