2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-12-27 11:52:46 +00:00
frappe_docker/build/frappe-socketio/Dockerfile

35 lines
1.3 KiB
Docker
Raw Normal View History

2021-01-08 12:15:22 +00:00
FROM node:buster-slim
2020-02-10 08:00:54 +00:00
2020-06-27 18:14:13 +00:00
# Add frappe user
2020-02-10 08:00:54 +00:00
RUN useradd -ms /bin/bash frappe
2020-06-27 18:14:13 +00:00
# Create bench directories and set ownership
RUN mkdir -p /home/frappe/frappe-bench/sites /home/frappe/frappe-bench/apps/frappe \
&& chown -R frappe:frappe /home/frappe
2020-02-10 08:00:54 +00:00
2020-06-27 18:14:13 +00:00
# Download socketio and purge curl package
COPY build/frappe-socketio/package.json /home/frappe/frappe-bench/apps/frappe
2020-06-27 18:14:13 +00:00
ARG GIT_BRANCH=develop
RUN apt-get update && apt-get install -y curl \
&& cd /home/frappe/frappe-bench/apps/frappe \
&& curl "https://raw.githubusercontent.com/frappe/frappe/$GIT_BRANCH/socketio.js" \
2020-02-10 08:00:54 +00:00
--output /home/frappe/frappe-bench/apps/frappe/socketio.js \
2020-06-27 18:14:13 +00:00
&& curl "https://raw.githubusercontent.com/frappe/frappe/$GIT_BRANCH/node_utils.js" \
--output /home/frappe/frappe-bench/apps/frappe/node_utils.js \
&& apt-get purge -y curl && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
2020-02-10 08:00:54 +00:00
RUN cd /home/frappe/frappe-bench/apps/frappe \
2020-03-09 13:39:28 +00:00
&& npm install --only=production \
&& node --version \
&& npm --version
2020-02-10 08:00:54 +00:00
# Setup docker-entrypoint
COPY build/frappe-socketio/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
2020-02-10 08:00:54 +00:00
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
WORKDIR /home/frappe/frappe-bench/sites
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["start"]