adding in some changes learnt from seibert-media/erpnext-docker

This commit is contained in:
Mendel Greenberg 2019-04-07 02:31:55 -04:00
parent 0470e8908f
commit 84a71148e3
No known key found for this signature in database
GPG key ID: B26A7D2DF7DC6EF7

View file

@ -4,11 +4,15 @@ FROM debian:9.6-slim
LABEL author=frappé
# Set locale C.UTF-8 for mariadb and general locale data
ENV LANG C.UTF-8
ENV PYTHONIOENCODING=utf-8
ENV LANGUAGE=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
RUN locale-gen en_US.UTF-8
# Install all neccesary packages
RUN apt-get update && apt-get install -y --no-install-suggests --no-install-recommends build-essential cron curl git \
libffi-dev liblcms2-dev libldap2-dev libmariadbclient-dev libsasl2-dev libssl-dev libtiff5-dev libwebp-dev mariadb-client \
libffi-dev liblcms2h-dev libldap2-dev libmariadbclient-dev libsasl2-dev libssl-dev libtiff5-dev libwebp-dev mariadb-client \
iputils-ping python-dev python-pip python-setuptools python-tk redis-tools rlwrap software-properties-common sudo tk8.6-dev \
vim xfonts-75dpi xfonts-base wget wkhtmltopdf \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
@ -18,9 +22,10 @@ RUN apt-get update && apt-get install -y --no-install-suggests --no-install-reco
&& npm install -g yarn
# Add frappe user and setup sudo
RUN useradd -ms /bin/bash -G sudo frappe \
RUN groupadd -g 500 frappe \
&& useradd -ms /bin/bash -u 500 -G 500 sudo frappe \
&& printf '# Sudo rules for frappe\nfrappe ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/frappe \
&& chown -R frappe:frappe /home/frappe
&& chown -R 500:500 /home/frappe
# Install bench
RUN pip install -e git+https://github.com/frappe/bench.git#egg=bench --no-cache