Docker: stretch -> buster
authorChocobozzz <me@florianbigard.com>
Thu, 12 Dec 2019 08:49:31 +0000 (09:49 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 12 Dec 2019 08:49:31 +0000 (09:49 +0100)
.gitlab-ci.yml
support/doc/docker.md
support/docker/production/Dockerfile.buster [new file with mode: 0644]
support/docker/production/Dockerfile.stretch [deleted file]
support/docker/production/docker-compose.yml

index d903f77ea07540f13a681c0196936f20ed2b2b9c..e9c1898f3245224a0efcaf8628268e4317928716 100644 (file)
@@ -107,25 +107,25 @@ build-nightly:
   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
index 4dd1eab4ac20dce1a417c690a350672bfe0bd42c..1b6f4abc3f0d386f8e83ec71a46be2d37156adcc 100644 (file)
@@ -81,7 +81,7 @@ $ docker-compose up -d
 ```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
diff --git a/support/docker/production/Dockerfile.buster b/support/docker/production/Dockerfile.buster
new file mode 100644 (file)
index 0000000..32c5266
--- /dev/null
@@ -0,0 +1,46 @@
+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
diff --git a/support/docker/production/Dockerfile.stretch b/support/docker/production/Dockerfile.stretch
deleted file mode 100644 (file)
index 32c5266..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-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
index 9f6c47eca388178d53868b94b8c994287b6c6c7c..b81a8745b525afb81c9424025497fb6a83545d6a 100644 (file)
@@ -23,8 +23,8 @@ services:
     # 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,