2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-12-23 02:28:57 +00:00
frappe_docker/images/socketio/Dockerfile
saiyam morakhiya b58a1a6d6f
Update Socketio Dockerfile (#831)
Changing user to frappe makes all after commands make executable under frappe user except COPY command so trying with externally specifying with --chown=frappe:frappe
2022-06-26 04:18:48 +05:30

26 lines
639 B
Docker

FROM alpine/git as builder
ARG FRAPPE_VERSION
ARG FRAPPE_REPO=https://github.com/frappe/frappe
RUN git clone --depth 1 -b ${FRAPPE_VERSION} ${FRAPPE_REPO} /opt/frappe
FROM node:17-alpine
RUN addgroup -S frappe \
&& adduser -S frappe -G frappe
USER frappe
WORKDIR /home/frappe/frappe-bench
RUN mkdir -p sites apps/frappe
COPY --chown=frappe:frappe --from=builder /opt/frappe/socketio.js /opt/frappe/node_utils.js apps/frappe/
COPY --chown=frappe:frappe package.json apps/frappe/
RUN cd apps/frappe \
&& npm install
WORKDIR /home/frappe/frappe-bench/sites
CMD [ "node", "/home/frappe/frappe-bench/apps/frappe/socketio.js" ]