Skip to content

Commit

Permalink
npm install as rocketchat user
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego authored and ggazzo committed Oct 22, 2024
1 parent e126bd5 commit 5f23057
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions apps/meteor/.docker/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,27 @@ ENV DEPLOY_METHOD=docker \

RUN aptMark="$(apt-mark showmanual)" \
&& apt-get install -y --no-install-recommends g++ make python3 ca-certificates \
&& cd /app/bundle/programs/server \
&& apt-mark auto '.*' > /dev/null \
&& apt-mark manual $aptMark > /dev/null

USER rocketchat

RUN cd /app/bundle/programs/server \
&& npm install \
&& cd npm/node_modules/isolated-vm \
&& npm install \
&& apt-mark auto '.*' > /dev/null \
&& apt-mark manual $aptMark > /dev/null \
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
&& npm cache clear --force

USER root

RUN find /usr/local -type f -executable -exec ldd '{}' ';' \
| awk '/=>/ { print $(NF-1) }' \
| sort -u \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
| sort -u \
| xargs -r apt-mark manual \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& npm cache clear --force
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false

USER rocketchat

Expand Down

0 comments on commit 5f23057

Please sign in to comment.