1 FROM registry.gitlab.com/gitterhq/webapp:latest
5 COPY output/app.tar.gz /tmp/app.tar.gz
7 RUN tar -xvzf /tmp/app.tar.gz -C /app && \
8 rm -rf node_modules npm-shrinkwrap.json package-lock.json && \
9 # node-gyp dependencies
11 apt-get install -y --no-install-recommends python g++ && \
12 # Normally we use `npm install --production` but we need the
13 # devDependencies(like webpack) installed so we can run in NODE_ENV=test-docker
15 # via https://github.com/nodejs/docker-node/blob/1d6a051d71e817f3947612a260ddcb02e48c2f74/10/buster-slim/Dockerfile#L53
16 apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python g++
19 RUN rm -rf /tmp/* /npm_cache /var/cache/apk/* /root/.npm /root/.node-gyp /root/.gnupg /root/.ssh 2>/dev/null
23 HEALTHCHECK --interval=2s --timeout=5s --retries=3 --start-period=20s \
24 CMD npm run health-check
26 CMD ["/bin/bash", "-c", "node web.js"]