[etherpad-web/oscp-backend] Create etherpad user
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [etherpad-web/oscp-backend] Create etherpad user
- Date: Wed, 13 May 2020 11:15:13 +0000 (UTC)
commit 75cbff4d83cb7dff851e1a0e8f56d49c9a9ad6e7
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Wed May 13 13:15:03 2020 +0200
Create etherpad user
Dockerfile | 16 ++++++++--------
fix-permissions.sh | 7 -------
2 files changed, 8 insertions(+), 15 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index 18158fe..5c7b063 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,6 +14,13 @@ RUN cd /opt && curl -SL \
> etherpad.zip && unzip etherpad && rm etherpad.zip && \
mv etherpad-lite-${ETHERPAD_VERSION} etherpad
+RUN groupadd etherpad -g 1000180000 && \
+ useradd etherpad -g 1000180000 -u 1000180000 -G etherpad -r -l -M -d /opt/etherpad && \
+ chown -R etherpad:etherpad /opt/etherpad
+
+ADD entrypoint.sh /entrypoint.sh
+
+USER etherpad
WORKDIR /opt/etherpad
RUN bin/installDeps.sh && rm settings.json
@@ -27,13 +34,6 @@ RUN npm install ep_adminpads \
ep_copy_paste_select_all \
ep_copy_paste_images
-ADD fix-permissions.sh /fix-permissions.sh
-ADD entrypoint.sh /entrypoint.sh
-
-RUN /fix-permissions.sh /opt/etherpad && \
- /fix-permissions.sh /.npm
-
-USER 1001
-
+USER etherpad
EXPOSE 9001
ENTRYPOINT ["/entrypoint.sh"]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]