FROM node:12-slim
ENV VERSION latest
RUN apt update && apt -y upgrade && apt -y install \
build-essential \
curl \
wget \
rsync \
git \
xz-utils \
ca-certificates \
procps \
python \
&& apt clean
WORKDIR /home/node
USER node
RUN wget -q https://releases.rocket.chat/$VERSION/download && tar -zxf download && rm download
WORKDIR /home/node/bundle/programs/server
RUN npm install && mkdir /home/node/uploads
WORKDIR /home/node/bundle
