mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Improve dockerfile (#6254)
* Do not cache packages during installation * Delete all caching directories after dependency installation
This commit is contained in:
parent
bf7cd11b59
commit
1382c0c955
1 changed files with 3 additions and 3 deletions
|
@ -66,7 +66,7 @@ ARG INSTALL_ABIWORD=
|
||||||
ARG INSTALL_SOFFICE=
|
ARG INSTALL_SOFFICE=
|
||||||
|
|
||||||
# Install dependencies required for modifying access.
|
# Install dependencies required for modifying access.
|
||||||
RUN apk add shadow bash
|
RUN apk add --no-cache shadow bash
|
||||||
# Follow the principle of least privilege: run as unprivileged user.
|
# Follow the principle of least privilege: run as unprivileged user.
|
||||||
#
|
#
|
||||||
# Running as non-root enables running this image in platforms like OpenShift
|
# Running as non-root enables running this image in platforms like OpenShift
|
||||||
|
@ -93,7 +93,7 @@ RUN \
|
||||||
mkdir -p /usr/share/man/man1 && \
|
mkdir -p /usr/share/man/man1 && \
|
||||||
npm install pnpm -g && \
|
npm install pnpm -g && \
|
||||||
apk update && apk upgrade && \
|
apk update && apk upgrade && \
|
||||||
apk add \
|
apk add --no-cache \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
|
@ -131,7 +131,7 @@ ENV ETHERPAD_PRODUCTION=true
|
||||||
COPY --chown=etherpad:etherpad ./src ./src
|
COPY --chown=etherpad:etherpad ./src ./src
|
||||||
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/admin/dist ./src/templates/admin
|
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/admin/dist ./src/templates/admin
|
||||||
|
|
||||||
RUN bin/installDeps.sh && rm -rf ~/.npm && \
|
RUN bin/installDeps.sh && rm -rf ~/.npm && rm -rf ~/.local && rm -rf ~/.cache && \
|
||||||
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \
|
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \
|
||||||
pnpm run install-plugins ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}}; \
|
pnpm run install-plugins ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}}; \
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue