before_script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > /kaniko/.docker/config.json
script:
- - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/support/docker/production/Dockerfile.stretch --destination $DOCKER_IMAGE_NAME
+ - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/support/docker/production/Dockerfile.buster --destination $DOCKER_IMAGE_NAME
build-docker-develop:
<<: *docker
only:
- schedules
variables:
- DOCKER_IMAGE_NAME: chocobozzz/peertube:develop-stretch
+ DOCKER_IMAGE_NAME: chocobozzz/peertube:develop-buster
build-docker-tag:
<<: *docker
only:
- tags
variables:
- DOCKER_IMAGE_NAME: chocobozzz/peertube:$CI_COMMIT_TAG-stretch
+ DOCKER_IMAGE_NAME: chocobozzz/peertube:$CI_COMMIT_TAG-buster
build-docker-master:
<<: *docker
only:
- master
variables:
- DOCKER_IMAGE_NAME: chocobozzz/peertube:production-stretch
+ DOCKER_IMAGE_NAME: chocobozzz/peertube:production-buster
```shell
$ git clone https://github.com/chocobozzz/PeerTube /tmp/peertube
$ cd /tmp/peertube
-$ docker build . -f ./support/docker/production/Dockerfile.stretch
+$ docker build . -f ./support/docker/production/Dockerfile.buster
```
## Development
--- /dev/null
+FROM node:10-buster-slim
+
+# Allow to pass extra options to the npm run build
+# eg: --light --light-fr to not build all client languages
+# (speed up build time if i18n is not required)
+ARG NPM_RUN_BUILD_OPTS
+
+# Install dependencies
+RUN apt update \
+ && apt install -y --no-install-recommends ffmpeg gnupg gosu \
+ && gosu nobody true \
+ && rm /var/lib/apt/lists/* -fR
+
+# Add peertube user
+RUN groupadd -r peertube \
+ && useradd -r -g peertube -m peertube
+
+# Install PeerTube
+COPY --chown=peertube:peertube . /app
+WORKDIR /app
+
+USER peertube
+
+RUN yarn install --pure-lockfile \
+ && npm run build -- $NPM_RUN_BUILD_OPTS \
+ && rm -r ./node_modules ./client/node_modules \
+ && yarn install --pure-lockfile --production \
+ && yarn cache clean
+
+USER root
+
+RUN mkdir /data /config
+RUN chown -R peertube:peertube /data /config
+
+ENV NODE_ENV production
+ENV NODE_CONFIG_DIR /config
+
+VOLUME /data
+VOLUME /config
+
+COPY ./support/docker/production/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
+
+# Run the application
+CMD ["npm", "start"]
+EXPOSE 9000
+++ /dev/null
-FROM node:10-buster-slim
-
-# Allow to pass extra options to the npm run build
-# eg: --light --light-fr to not build all client languages
-# (speed up build time if i18n is not required)
-ARG NPM_RUN_BUILD_OPTS
-
-# Install dependencies
-RUN apt update \
- && apt install -y --no-install-recommends ffmpeg gnupg gosu \
- && gosu nobody true \
- && rm /var/lib/apt/lists/* -fR
-
-# Add peertube user
-RUN groupadd -r peertube \
- && useradd -r -g peertube -m peertube
-
-# Install PeerTube
-COPY --chown=peertube:peertube . /app
-WORKDIR /app
-
-USER peertube
-
-RUN yarn install --pure-lockfile \
- && npm run build -- $NPM_RUN_BUILD_OPTS \
- && rm -r ./node_modules ./client/node_modules \
- && yarn install --pure-lockfile --production \
- && yarn cache clean
-
-USER root
-
-RUN mkdir /data /config
-RUN chown -R peertube:peertube /data /config
-
-ENV NODE_ENV production
-ENV NODE_CONFIG_DIR /config
-
-VOLUME /data
-VOLUME /config
-
-COPY ./support/docker/production/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
-ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
-
-# Run the application
-CMD ["npm", "start"]
-EXPOSE 9000
# If you don't want to use the official image and build one from sources
# build:
# context: .
- # dockerfile: ./support/docker/production/Dockerfile.stretch
- image: chocobozzz/peertube:production-stretch
+ # dockerfile: ./support/docker/production/Dockerfile.buster
+ image: chocobozzz/peertube:production-buster
env_file:
- .env
# Traefik labels are suggested as an example for people using Traefik,