From aa8985a2a5c4e131130a6610bc842f124838d3a4 Mon Sep 17 00:00:00 2001
From: Igor WITZ <igor.witz@etu.utc.fr>
Date: Thu, 11 Oct 2018 13:22:39 +0100
Subject: [PATCH] =?UTF-8?q?D=C3=A9pendance=20sur=20image=20node=20plut?=
 =?UTF-8?q?=C3=B4t=20que=20pica-debian?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 pica-etherpad/Dockerfile | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/pica-etherpad/Dockerfile b/pica-etherpad/Dockerfile
index 0edb1c17..5c6dc218 100644
--- a/pica-etherpad/Dockerfile
+++ b/pica-etherpad/Dockerfile
@@ -1,7 +1,7 @@
-FROM registry.picasoft.net:5000/pica-debian:latest
+FROM node:10.11.0-stretch 
 MAINTAINER antoine@barbare.me
 
-ENV ETHERPAD_VERSION 1.6.5
+ENV ETHERPAD_VERSION 1.7.0
 ENV ETHERPAD_LANDING_PAGE_VERSION v0.1
 ENV NODE_ENV=production
 
@@ -9,17 +9,13 @@ ENV NODE_ENV=production
 COPY entrypoint.sh /entrypoint.sh
 
 #Installation de dépendances + NodeJS + NPM
-RUN useradd -d /opt/etherpad-lite -u 1000 etherpad && \
-    curl -sL https://deb.nodesource.com/setup_9.x | bash - && \
-    apt-get update && \
+RUN apt-get update && \
     apt-get install -y \
-      build-essentials \
       curl \
       git \
       gzip \
       libssl-dev \
       mysql-client \
-      nodejs \
       pkg-config \
       python \
       unzip && \
@@ -28,10 +24,11 @@ RUN useradd -d /opt/etherpad-lite -u 1000 etherpad && \
     unzip etherpad && \
     rm -Rf etherpad.zip etherpad-lite-${ETHERPAD_VERSION}/.git && \
     mv etherpad-lite-${ETHERPAD_VERSION} /opt/etherpad-lite && \
-    chown -R etherpad: /opt/etherpad-lite && \
-    chmod +x /entrypoint.sh
+    chown -R node: /opt/etherpad-lite && \
+    chmod +x /entrypoint.sh && \
+    usermod -d /opt/etherpad-lite node
 
-USER etherpad
+USER node
 WORKDIR /opt/etherpad-lite
 
 #First starting of services
@@ -54,7 +51,9 @@ RUN bin/installDeps.sh && \
         ep_user_font_size
         
 
-RUN cd ~/src/templates && \
+RUN mkdir -p ~/src/templates && \
+    mkdir -p ~/static && \
+    cd ~/src/templates && \
     git clone https://framagit.org/DeBugs/picasoft-etherpad-landing-page.git && \
     cd ./picasoft-etherpad-landing-page/ && \
     git checkout ${ETHERPAD_LANDING_PAGE_VERSION} && \
-- 
GitLab