From 15a9a3be43a7e8399042d9cd533869540c9dc82f Mon Sep 17 00:00:00 2001 From: KennyLee Date: Thu, 16 May 2019 15:05:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0node=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gitbook/Dockerfile | 7 ++- node/Dockerfile | 12 +---- registry/docker-compose-with-auth.yml | 71 ++++++++++++++++----------- registry/docker-compose.yml | 4 +- 4 files changed, 48 insertions(+), 46 deletions(-) diff --git a/gitbook/Dockerfile b/gitbook/Dockerfile index e82a2c8..13aca98 100755 --- a/gitbook/Dockerfile +++ b/gitbook/Dockerfile @@ -2,10 +2,9 @@ # NAME: kennylee26/gitbook # Pull base image. -FROM index.alauda.cn/kenny/node -#FROM kennylee26/node:5.1.1 +FROM registry.cn-hangzhou.aliyuncs.com/kennylee/node -ENV GIT_BOOK_VERSION="2.6.4" +ENV GIT_BOOK_VERSION="2.6.9" ENV BOOKDIR /gitbook # Basic Requirements @@ -19,7 +18,7 @@ RUN apt-get install -y fonts-wqy-microhei RUN cnpm install gitbook-cli -g && \ cnpm install svgexport -g -RUN gitbook versions:install $GIT_BOOK_VERSION +RUN gitbook versions:install $GIT_BOOK_VERSION # install recommend plugins diff --git a/node/Dockerfile b/node/Dockerfile index 6a7b8d1..41db299 100755 --- a/node/Dockerfile +++ b/node/Dockerfile @@ -1,16 +1,8 @@ -FROM node +FROM node:8.16-jessie MAINTAINER kennylee26 -RUN echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib\n\ - deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib\n\ - deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib\n\ - deb-src http://mirrors.163.com/debian/ jessie main non-free contrib\n\ - deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib\n\ - deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib\n\ - deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib\n\ - deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib\n\ - deb http://ftp.cn.debian.org/debian jessie main" > /etc/apt/sources.list +# COPY jessie.sources.list /etc/apt/sources.list RUN apt-get update && \ apt-get install -y curl git unzip vim wget && \ diff --git a/registry/docker-compose-with-auth.yml b/registry/docker-compose-with-auth.yml index 940162e..3fdc52d 100644 --- a/registry/docker-compose-with-auth.yml +++ b/registry/docker-compose-with-auth.yml @@ -1,31 +1,42 @@ -docker_auth: - image: cesanta/docker_auth - container_name: 'docker_auth' - ports: - - "5001:5001" - volumes: - - /home/tkadmin/kennylee/compose/registry/auth_server/config:/config:ro - - /var/log/docker_auth:/logs - - /home/tkadmin/kennylee/compose/registry/auth_server/ssl:/ssl - command: /config/auth_config.yml - restart: always - -timekey_registry: - image: index.alauda.cn/kenny/docker-registry-v2-1-1 - container_name: 'timekey_registry' - ports: - - 5000:5000 - volumes: - - /home/tkadmin/kennylee/compose/registry/auth_server/ssl:/ssl - - /opt/data/registry2:/var/lib/registry - restart: always - environment: - - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/var/lib/registry - - REGISTRY_AUTH=token - - REGISTRY_AUTH_TOKEN_REALM=https://192.168.1.96:5001/auth - - REGISTRY_AUTH_TOKEN_SERVICE="Docker registry" - - REGISTRY_AUTH_TOKEN_ISSUER="Auth Service" - - REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE=/ssl/server.pem - - REGISTRY_HTTP_TLS_CERTIFICATE=/ssl/server.pem - - REGISTRY_HTTP_TLS_KEY=/ssl/server.key +version: '3' +services: + docker_auth: + image: cesanta/docker_auth + container_name: 'docker_auth' + ports: + - "5001:5001" + volumes: + - ./data/docker_auth/auth_server/config:/config:ro + - ./data/log/docker_auth:/logs + - ./data/docker_auth/auth_server/ssl:/ssl + command: /config/auth_config.yml + restart: on-failure + logging: + driver: 'json-file' + options: + max-size: '30m' + max-file: '1' + registry: + image: registry.cn-hangzhou.aliyuncs.com/kennylee/registry + container_name: 'docker_registry' + ports: + - 5000:5000 + volumes: + - ./data/docker_auth/auth_server/ssl:/ssl + - ./data/registry2:/var/lib/registry + restart: on-failure + environment: + - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/var/lib/registry + - REGISTRY_AUTH=token + - REGISTRY_AUTH_TOKEN_REALM=https://192.168.1.100:5001/auth + - REGISTRY_AUTH_TOKEN_SERVICE="Docker registry" + - REGISTRY_AUTH_TOKEN_ISSUER="Auth Service" + - REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE=/ssl/server.pem + - REGISTRY_HTTP_TLS_CERTIFICATE=/ssl/server.pem + - REGISTRY_HTTP_TLS_KEY=/ssl/server.key + logging: + driver: 'json-file' + options: + max-size: '30m' + max-file: '1' diff --git a/registry/docker-compose.yml b/registry/docker-compose.yml index f64491f..a33535b 100644 --- a/registry/docker-compose.yml +++ b/registry/docker-compose.yml @@ -6,6 +6,6 @@ services: ports: - 5000:5000 volumes: - - /home/data/registry:/var/lib/registry - restart: unless-stopped + - ./data/registry:/var/lib/registry + restart: on-failure