Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dockerfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Picasoft
Technique
Dockerfiles
Commits
50c2d757
Commit
50c2d757
authored
4 years ago
by
Roma
Browse files
Options
Downloads
Patches
Plain Diff
Faster compilation (owner of /opt/etherpad)
parent
f95909e7
No related branches found
Branches containing commit
No related tags found
1 merge request
!57
Delete pad after delay
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pica-etherpad/Dockerfile
+35
-9
35 additions, 9 deletions
pica-etherpad/Dockerfile
with
35 additions
and
9 deletions
pica-etherpad/Dockerfile
+
35
−
9
View file @
50c2d757
...
...
@@ -13,6 +13,9 @@ ARG ETHERPAD_PLUGINS="\
ep_pads_stats ep_prompt_for_name ep_set_title_on_pad \
ep_subscript_and_superscript"
RUN
apt-get update
&&
\
apt-get
install
-y
\
curl
\
...
...
@@ -25,15 +28,27 @@ RUN apt-get update && \
unzip
&&
\
mkdir
-p
/opt/etherpad-lite/
# Try to stick to the LDAP UID for etherpad (OU=services)
# WARNING: is also defined hereinbelow
ARG
UID=5004
RUN
useradd
--uid
${
UID
}
--create-home
etherpad
RUN
chown
etherpad /opt/etherpad-lite
WORKDIR
/opt/etherpad-lite
# Install Etherpad
# Install Etherpad, as user etherpad
USER
etherpad
RUN
curl
-SL
https://github.com/ether/etherpad-lite/archive/
${
ETHERPAD_VERSION_BUILD
}
.zip
>
etherpad.zip
&&
\
unzip etherpad
&&
\
rm
-Rf
etherpad.zip etherpad-lite-
${
ETHERPAD_VERSION_BUILD
}
/.git
&&
\
mv
etherpad-lite-
${
ETHERPAD_VERSION_BUILD
}
/
*
.
&&
\
bin/installDeps.sh
COPY
./landing-page ./src/templates/landing-page
COPY
--chown=etherpad
./landing-page ./src/templates/landing-page
# Build and replace landing page
RUN
npm
install
minify
&&
\
...
...
@@ -51,28 +66,39 @@ RUN for PLUGIN_NAME in ${ETHERPAD_PLUGINS}; do npm install "${PLUGIN_NAME}"; don
FROM
base
# Try to stick to the LDAP UID for etherpad (OU=services)
# WARNING: is also defined hereinabove
ARG
UID=5004
COPY
entrypoint.sh /opt/etherpad-lite/entrypoint.sh
RUN
useradd
--uid
${
UID
}
--create-home
etherpad
USER
etherpad
# Import des fichiers téléchargés dans l'image downloader
COPY
--from=downloader /opt/etherpad-lite /opt/etherpad-lite/
RUN
chown
-R
etherpad /opt/etherpad-lite
# Install debian packages, as root
USER
root
RUN
apt-get update
&&
\
apt-get
install
-y
curl nano postgresql-client
&&
\
chmod
+x /opt/etherpad-lite/entrypoint.sh
&&
\
usermod
-d
/opt/etherpad-lite etherpad
&&
\
chown
-R
etherpad /opt/etherpad-lite
&&
\
rm
-rf
/var/lib/apt/lists/
*
# Created folder for deleted pads
RUN
mkdir
/opt/etherpad-lite/deleted_pads
&&
\
chown
-R
etherpad:etherpad /opt/etherpad-lite/deleted_pads
# Set etherpad as owner of etherpad (permission for its content was already set in downloader)
RUN
chown
etherpad:etherpad /opt/etherpad-lite
# Copy entrypoint script
COPY
entrypoint.sh /opt/etherpad-lite/entrypoint.sh
RUN
chmod
+x /opt/etherpad-lite/entrypoint.sh
&&
\
usermod
-d
/opt/etherpad-lite etherpad
# Settings for entrypoint
USER
etherpad
EXPOSE
8080
HEALTHCHECK
--interval=20s --timeout=3s CMD curl --fail http://localhost:8080 || exit 1
WORKDIR
/opt/etherpad-lite/
USER
etherpad
ENTRYPOINT
["/opt/etherpad-lite/entrypoint.sh", "/bin/bash", "-c", "/opt/etherpad-lite/bin/run.sh" ]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment