From 6b7b49089bc5de55de7eabaad156c98a96aace42 Mon Sep 17 00:00:00 2001 From: chabad360 Date: Thu, 4 Oct 2018 18:59:18 -0700 Subject: [PATCH] Condensed Dockerfile Updated to latest node, and uses python-pip, also condensed a lot the Dockerfile. --- Dockerfile | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d9bd63e..7c44696b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,39 +5,31 @@ FROM ubuntu:16.04 MAINTAINER frappé USER root -RUN apt-get update -RUN apt-get install -y iputils-ping -RUN apt-get install -y git build-essential python-setuptools python-dev libffi-dev libssl-dev -RUN apt-get install -y redis-tools redis-server software-properties-common libxrender1 libxext6 xfonts-75dpi xfonts-base -RUN apt-get install -y libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev python-tk apt-transport-https libsasl2-dev libldap2-dev libtiff5-dev tcl8.6-dev tk8.6-dev -RUN apt-get install -y wget -RUN wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py -RUN pip install --upgrade setuptools pip RUN useradd -ms /bin/bash frappe -RUN apt-get install -y curl -RUN apt-get install -y rlwrap -RUN apt-get install redis-tools -RUN apt-get install -y nano +RUN apt-get update +RUN apt-get install -y iputils-ping git build-essential python-setuptools python-dev libffi-dev libssl-dev \ + && apt-get install -y redis-tools redis-server software-properties-common libxrender1 libxext6 xfonts-75dpi xfonts-base \ + && apt-get install -y libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev python-tk apt-transport-https libsasl2-dev libldap2-dev libtiff5-dev tcl8.6-dev tk8.6-dev wget \ + && apt-get install -y libmysqlclient-dev mariadb-client mariadb-common curl rlwrap redis-tools nano wkhtmltopdf python-pip +RUN pip install --upgrade setuptools pip # Generate locale C.UTF-8 for mariadb and general locale data ENV LANG C.UTF-8 #nodejs -RUN apt-get install curl -RUN curl https://deb.nodesource.com/node_6.x/pool/main/n/nodejs/nodejs_6.7.0-1nodesource1~xenial1_amd64.deb > node.deb \ +RUN curl https://deb.nodesource.com/node_10.x/pool/main/n/nodejs/nodejs_10.10.0-1nodesource1_amd64.deb > node.deb \ && dpkg -i node.deb \ && rm node.deb -RUN apt-get install -y wkhtmltopdf USER frappe WORKDIR /home/frappe RUN git clone -b master https://github.com/frappe/bench.git bench-repo USER root -RUN pip install -e bench-repo -RUN apt-get install -y libmysqlclient-dev mariadb-client mariadb-common -RUN npm install -g yarn -RUN chown -R frappe:frappe /home/frappe/* +RUN pip install -e bench-repo \ + && npm install -g yarn \ + && chown -R frappe:frappe /home/frappe/* USER frappe WORKDIR /home/frappe/frappe-bench +WORKDIR /home/frappe/frappe-bench