1 FROM node:10-buster-slim
3 # Allow to pass extra options to the npm run build
4 # eg: --light --light-fr to not build all client languages
5 # (speed up build time if i18n is not required)
10 && apt install -y --no-install-recommends openssl ffmpeg python gnupg gosu \
12 && rm /var/lib/apt/lists/* -fR
15 RUN groupadd -r peertube \
16 && useradd -r -g peertube -m peertube
19 COPY --chown=peertube:peertube . /app
24 RUN yarn install --pure-lockfile \
25 && npm run build -- $NPM_RUN_BUILD_OPTS \
26 && rm -r ./node_modules ./client/node_modules \
27 && yarn install --pure-lockfile --production \
32 RUN mkdir /data /config
33 RUN chown -R peertube:peertube /data /config
35 ENV NODE_ENV production
36 ENV NODE_CONFIG_DIR /config
41 COPY ./support/docker/production/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
42 ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]