mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-26 00:55:10 +00:00
move bench install to init.sh file
This commit is contained in:
parent
715b2fabf2
commit
6fcbdfe174
2 changed files with 8 additions and 16 deletions
21
Dockerfile
21
Dockerfile
|
|
@ -46,27 +46,16 @@ RUN wget https://bootstrap.pypa.io/get-pip.py \
|
|||
&& pip install --upgrade setuptools pip
|
||||
|
||||
#install nodejs
|
||||
USER root
|
||||
RUN curl https://deb.nodesource.com/node_6.x/pool/main/n/nodejs/nodejs_6.7.0-1nodesource1~xenial1_amd64.deb > node.deb \
|
||||
&& 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
|
||||
RUN git clone -b develop https://github.com/frappe/bench.git bench-repo
|
||||
|
||||
#install bench
|
||||
USER root
|
||||
RUN pip install -e bench-repo
|
||||
RUN mkdir /home/frappe/frappe-bench
|
||||
RUN chown -R frappe:frappe /home/frappe/*
|
||||
RUN useradd -ms /bin/bash frappe \
|
||||
&& usermod -aG sudo frappe \
|
||||
&& printf '# User rules for frappe\nfrappe ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/frappe \
|
||||
&& mkdir /home/frappe/frappe-bench \
|
||||
&& chown -R frappe:frappe /home/frappe/*
|
||||
|
||||
COPY ./conf/frappe/* /home/frappe/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "----------------------- [ Install bench ] ---------------------------------"
|
||||
git clone -b develop https://github.com/frappe/bench.git bench-repo
|
||||
sudo pip install -e bench-repo
|
||||
echo "----------------------- [ init bench ] ---------------------------------"
|
||||
bench init frappe-bench --skip-bench-mkdir --skip-redis-config-generation
|
||||
echo "----------------------- [ config bench ] ---------------------------------"
|
||||
|
|
|
|||
Loading…
Reference in a new issue