From 436df887c9c606f83aa85516e8fd0e9ced7f5e32 Mon Sep 17 00:00:00 2001 From: ahkui <14049597+ahkui@users.noreply.github.com> Date: Tue, 18 Sep 2018 11:15:59 +0800 Subject: [PATCH] Add docker registry (#1770) * add docker registry and docker registry web ui --- docker-compose.yml | 29 +++++++++++++++++++++++++++++ docker-registry/Dockerfile | 3 +++ docker-web-ui/Dockerfile | 3 +++ env-example | 11 +++++++++++ 4 files changed, 46 insertions(+) create mode 100644 docker-registry/Dockerfile create mode 100644 docker-web-ui/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 062b84e5..ea3e3250 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1070,6 +1070,35 @@ services: networks: - backend +### DOCKER-REGISTRY ################################################ + docker-registry: + build: + context: ./docker-registry + volumes: + - /etc/localtime:/etc/localtime:ro + - ${DATA_PATH_HOST}/docker-registry:/var/lib/registry + ports: + - "${DOCKER_REGISTRY_PORT}:5000" + networks: + - backend + +### DOCKER-WEB-UI ################################################ + docker-web-ui: + build: + context: ./docker-web-ui + environment: + - TZ=${WORKSPACE_TIMEZONE} + - ENV_DOCKER_REGISTRY_HOST=${DOCKER_WEBUI_REGISTRY_HOST} + - ENV_DOCKER_REGISTRY_PORT=${DOCKER_WEBUI_REGISTRY_PORT} + - ENV_DOCKER_REGISTRY_USE_SSL=${DOCKER_REGISTRY_USE_SSL} + - ENV_MODE_BROWSE_ONLY=${DOCKER_REGISTRY_BROWSE_ONLY} + volumes: + - /etc/localtime:/etc/localtime:ro + ports: + - "${DOCKER_WEBUI_PORT}:80" + networks: + - frontend + - backend ### MAILU ################################################ mailu: diff --git a/docker-registry/Dockerfile b/docker-registry/Dockerfile new file mode 100644 index 00000000..daa7c57f --- /dev/null +++ b/docker-registry/Dockerfile @@ -0,0 +1,3 @@ +FROM registry:2 + +LABEL maintainer="ahkui " diff --git a/docker-web-ui/Dockerfile b/docker-web-ui/Dockerfile new file mode 100644 index 00000000..48e01bc1 --- /dev/null +++ b/docker-web-ui/Dockerfile @@ -0,0 +1,3 @@ +FROM konradkleine/docker-registry-frontend:v2 + +LABEL maintainer="ahkui " diff --git a/env-example b/env-example index 89929d37..b4a77336 100644 --- a/env-example +++ b/env-example @@ -539,6 +539,17 @@ IDE_WEBIDE_PORT=984 IDE_CODIAD_PORT=985 IDE_ICECODER_PORT=986 +### DOCKERREGISTRY ############################################### +DOCKER_REGISTRY_PORT=5000 + +### DOCKERWEBUI ############################################### +DOCKER_WEBUI_REGISTRY_HOST=docker-registry +DOCKER_WEBUI_REGISTRY_PORT=5000 +# if have use https proxy please set to 1 +DOCKER_REGISTRY_USE_SSL=0 +DOCKER_REGISTRY_BROWSE_ONLY=false +DOCKER_WEBUI_PORT=8754 + ### MAILU ############################################### MAILU_VERSION=latest MAILU_RECAPTCHA_PUBLIC_KEY=