merge install pre-requisites RUN into 1 RUN

This commit is contained in:
pipeCh 2017-12-22 12:24:41 +07:00
parent 0c3cc85b54
commit 715b2fabf2

View file

@ -3,29 +3,47 @@ MAINTAINER frappé
#install pre-requisites
USER root
RUN apt-get update
RUN apt-get install -y sudo
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 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 libmysqlclient-dev mariadb-client mariadb-common
RUN apt-get install -y wget
RUN apt-get install -y curl
RUN apt-get install -y rlwrap
RUN apt-get install -y redis-tools
RUN apt-get install -y nano
RUN apt-get install -y curl
RUN apt-get install -y wkhtmltopdf
RUN wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
RUN pip install --upgrade setuptools pip
RUN apt-get upgrade
RUN apt-get update && apt-get install -y \
apt-transport-https \
build-essential \
curl \
git \
iputils-ping \
libffi-dev \
libfreetype6-dev \
libjpeg8-dev \
liblcms2-dev \
libldap2-dev \
libmysqlclient-dev \
libsasl2-dev \
libssl-dev \
libtiff5-dev \
libwebp-dev \
libxext6 \
libxrender1 \
mariadb-client \
mariadb-common \
nano \
python-dev \
python-setuptools \
python-tk \
redis-tools \
rlwrap \
software-properties-common \
sudo \
tcl8.6-dev \
tk8.6-dev \
wget \
wkhtmltopdf \
xfonts-75dpi \
xfonts-base \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
#add users & sudoers
USER root
RUN useradd -ms /bin/bash frappe
RUN usermod -aG sudo frappe
RUN printf '# User rules for frappe\nfrappe ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/frappe
#install pip
RUN wget https://bootstrap.pypa.io/get-pip.py \
&& python get-pip.py \
&& pip install --upgrade setuptools pip
#install nodejs
USER root
@ -33,6 +51,12 @@ RUN curl https://deb.nodesource.com/node_6.x/pool/main/n/nodejs/nodejs_6.7.0-1no
&& dpkg -i node.deb \
&& rm node.deb
#add users & sudoers
USER root
RUN useradd -ms /bin/bash frappe
RUN usermod -aG sudo frappe
RUN printf '# User rules for frappe\nfrappe ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/frappe
#clone bench repo
USER frappe
WORKDIR /home/frappe