Skip to content
Snippets Groups Projects
Commit bfd476ff authored by Igor Witz's avatar Igor Witz
Browse files

corrections de bugs

parent 1c55bea8
No related branches found
No related tags found
1 merge request!9Correction vulnerabilites pica etherpad
......@@ -32,7 +32,6 @@ RUN curl -SL https://github.com/ether/etherpad-lite/archive/${ETHERPAD_VERSION}.
rm -Rf etherpad.zip etherpad-lite-${ETHERPAD_VERSION}/.git && \
mv etherpad-lite-${ETHERPAD_VERSION}/* . && \
mkdir -p src/templates && \
mkdir -p static && \
bin/installDeps.sh && \
rm settings.json && \
npm install \
......@@ -53,16 +52,16 @@ RUN curl -SL https://github.com/ether/etherpad-lite/archive/${ETHERPAD_VERSION}.
git clone https://framagit.org/DeBugs/picasoft-etherpad-landing-page.git src/templates/picasoft-etherpad-landing-page && \
git --git-dir=src/templates/picasoft-etherpad-landing-page/.git checkout ${ETHERPAD_LANDING_PAGE_VERSION} && \
cp src/templates/picasoft-etherpad-landing-page/index.html src/templates/index.html && \
cp src/templates/picasoft-etherpad-landing-page/static/* static/ -r
cp src/templates/picasoft-etherpad-landing-page/static/* src/static/ -r
# construction de l'image finale
FROM base
COPY entrypoint.sh /entrypoint.sh
COPY entrypoint.sh /opt/etherpad-lite/entrypoint.sh
RUN apt-get update && \
apt-get install -y mysql-client && \
chmod +x /entrypoint.sh && \
chmod +x /opt/etherpad-lite/entrypoint.sh && \
mkdir -p /opt/etherpad-lite && \
chown -R node /opt/etherpad-lite && \
usermod -d /opt/etherpad-lite node && \
......@@ -71,7 +70,8 @@ RUN apt-get update && \
# import des fichiers téléchargés dans l'image downloader
COPY --from=downloader --chown=node /opt/etherpad-lite /opt/etherpad-lite/
ENTRYPOINT ["/entrypoint.sh"]
USER node
ENTRYPOINT ["/opt/etherpad-lite/entrypoint.sh"]
CMD /bin/bash -c "/opt/etherpad-lite/bin/run.sh"
HEALTHCHECK CMD curl -s 127.0.0.1:${ETHERPAD_PORT:=8080}
......
......@@ -39,9 +39,9 @@ if [ "$RESULT" != $ETHERPAD_DB_NAME ]; then
-e "create database ${ETHERPAD_DB_NAME}"
fi
if [ ! -f settings.json ]; then
if [ ! -f /opt/etherpad-lite/settings.json ]; then
cat <<- EOF > settings.json
cat <<- EOF > /opt/etherpad-lite/settings.json
{
"title": "${ETHERPAD_TITLE}",
"ip": "0.0.0.0",
......@@ -60,7 +60,7 @@ if [ ! -f settings.json ]; then
: ${ETHERPAD_ADMIN_USER:=admin}
cat <<- EOF >> settings.json
cat <<- EOF >> /opt/etherpad-lite/settings.json
"users": {
"${ETHERPAD_ADMIN_USER}": {
"password": "${ETHERPAD_ADMIN_PASSWORD}",
......@@ -70,7 +70,7 @@ if [ ! -f settings.json ]; then
EOF
fi
cat <<- EOF >> settings.json
cat <<- EOF >> /opt/etherpad-lite/settings.json
}
EOF
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment