Skip to content
Snippets Groups Projects
Commit 0649a67e authored by Guilherme Gazzo's avatar Guilherme Gazzo
Browse files

chore: npm install as rocketchat user (#33726)


Co-authored-by: default avatarDiego Sampaio <chinello@gmail.com>
parent c683a417
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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