commit e1c9d8a8fcc771d33b8998b3f96977e531a21eec Author: Arnaud G. GIBERT Date: Fri Oct 30 19:28:39 2026 +0100 - Initial release, - Based on rx3-docker/php-apache:1.7.3-mga9 images, - Use docker-registry-ui 2.6.0. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..556bc65 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +*.old diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6533278 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,93 @@ +# Rx3-Docker/Registry-UI Dockerfile +#------------------------------------------------------------------------------- + +ARG IMG_FROM_URL="rx3-docker/php-apache:latest" + +FROM ${IMG_FROM_URL} + +ARG IMG_NAME +ARG IMG_NAME_FULL +ARG IMG_VERSION +ARG IMG_MAINTAINER +ARG IMG_URL + +LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL} +LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION} +LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER} +LABEL maintainer=${IMG_MAINTAINER} + +ARG MODULE_NAME +ARG MODULE_PATH +ARG MODULE_VERSION +ARG REGUI_CONF_NAME + +ARG HTTPD_VHOST_CONFIG_DIR=/etc/httpd/conf/sites.d/default_vhost.d +ARG REGUI_HTTPD_CONFIG_FILE=${HTTPD_VHOST_CONFIG_DIR}/60-regui.conf + +ARG REGUI_DOWNLOAD_URL="https://mirror.rx3.net/external/docker-registry-ui/docker-registry-ui-2.6.0.tar.gz" + + +#----------------------------------------------------------------------------------------------------------------------- +ARG REGUID='#!/bin/bash \n\ + \n\ +cp -f /var/www/html/index.html.ref /var/www/html/index.html \n\ + \n\ +sed -i "s~\${DOCKER_REGISTRY_UI_TITLE}~${DOCKER_REGISTRY_UI_TITLE}~" /var/www/html/index.html \n\ +sed -i "s~\${REGISTRY_URL}~${REGISTRY_URL}~" /var/www/html/index.html \n\ +sed -i "s~\${REGISTRY_TITLE}~${REGISTRY_TITLE}~" /var/www/html/index.html \n\ +sed -i "s~\${PULL_URL}~${PULL_URL}~" /var/www/html/index.html \n\ +sed -i "s~\${SINGLE_REGISTRY}~${SINGLE_REGISTRY}~" /var/www/html/index.html \n\ +sed -i "s~\${CATALOG_ELEMENTS_LIMIT}~${CATALOG_ELEMENTS_LIMIT}~" /var/www/html/index.html \n\ +sed -i "s~\${SHOW_CONTENT_DIGEST}~${SHOW_CONTENT_DIGEST}~" /var/www/html/index.html \n\ +sed -i "s~\${SHOW_TAG_HISTORY}~${SHOW_TAG_HISTORY}~" /var/www/html/index.html \n\ +sed -i "s~\${DEFAULT_REGISTRIES}~${DEFAULT_REGISTRIES}~" /var/www/html/index.html \n\ +sed -i "s~\${READ_ONLY_REGISTRIES}~${READ_ONLY_REGISTRIES}~" /var/www/html/index.html \n\ +sed -i "s~\${SHOW_CATALOG_NB_TAGS}~${SHOW_CATALOG_NB_TAGS}~" /var/www/html/index.html \n\ +sed -i "s~\${HISTORY_CUSTOM_LABELS}~${HISTORY_CUSTOM_LABELS}~" /var/www/html/index.html \n\ +sed -i "s~\${USE_CONTROL_CACHE_HEADER}~${USE_CONTROL_CACHE_HEADER}~" /var/www/html/index.html \n\ +sed -i "s~\${TAGLIST_ORDER}~${TAGLIST_ORDER}~" /var/www/html/index.html \n\ +sed -i "s~\${CATALOG_DEFAULT_EXPANDED}~${CATALOG_DEFAULT_EXPANDED}~" /var/www/html/index.html \n\ +sed -i "s~\${CATALOG_MIN_BRANCHES}~${CATALOG_MIN_BRANCHES}~" /var/www/html/index.html \n\ +sed -i "s~\${CATALOG_MAX_BRANCHES}~${CATALOG_MAX_BRANCHES}~" /var/www/html/index.html \n\ +sed -i "s~\${TAGLIST_PAGE_SIZE}~${TAGLIST_PAGE_SIZE}~" /var/www/html/index.html \n\ +sed -i "s~\${REGISTRY_SECURED}~${REGISTRY_SECURED}~" /var/www/html/index.html \n\ +sed -i "s~\${ENABLE_VERSION_NOTIFICATION}~${ENABLE_VERSION_NOTIFICATION}~" /var/www/html/index.html \n\ + \n\ +grep -o `THEME[A-Z_]*` /var/www/html/index.html | while read e; do \n\ + sed -i "s~\${$e}~$(printenv $e)~" /var/www/html/index.html \n\ +done \n\ + \n\ +if [ -z "${DELETE_IMAGES}" ] || [ "${DELETE_IMAGES}" = false ] ; then \n\ + sed -i "s/\${DELETE_IMAGES}/false/" /var/www/html/index.html \n\ +else \n\ + sed -i "s/\${DELETE_IMAGES}/true/" /var/www/html/index.html \n\ +fi \n\ + \n\ +cp '${REGUI_HTTPD_CONFIG_FILE}.ref' '${REGUI_HTTPD_CONFIG_FILE}' \n\ +sed -i -e "s/\\${REGUI_REGISTRY_PROTO}/${REGUI_REGISTRY_PROTO}/" '${REGUI_HTTPD_CONFIG_FILE}' \n\ +sed -i -e "s/\\${REGUI_REGISTRY_HOST_NAME}/${REGUI_REGISTRY_HOST_NAME}/" '${REGUI_HTTPD_CONFIG_FILE}' \n\ +sed -i -e "s/\\${REGUI_REGISTRY_PORT}/${REGUI_REGISTRY_PORT}/" '${REGUI_HTTPD_CONFIG_FILE} +#----------------------------------------------------------------------------------------------------------------------- + + + +#----------------------------------------------------------------------------------------------------------------------- +ARG REGUI_HTTPD_CONFIG='# Registry-UI Configuration \n\ + \n\ +Use Proxy_Ext_Int v2 v2 ${REGUI_REGISTRY_PROTO} ${REGUI_REGISTRY_HOST_NAME} ${REGUI_REGISTRY_PORT} \n\ +' +#----------------------------------------------------------------------------------------------------------------------- + + + +RUN . /etc/profile.d/rx3.sh && isl --add ${IMG_URL} \ + && urpmi.update -a \ + && urpmi --force wget \ + && wget -q -O- ${REGUI_DOWNLOAD_URL} | tar xzf - -C /tmp \ + && mv /tmp/docker-registry-ui-*/dist/* /var/www/html \ + && mv /tmp/docker-registry-ui-*/favicon.ico /var/www/html \ + && mv /var/www/html/index.html /var/www/html/index.html.ref \ + && echo -e "${REGUI_HTTPD_CONFIG}" | sed -e "s/\`/'/g" -e 's/ *$//' > ${REGUI_HTTPD_CONFIG_FILE}.ref \ + && echo -e "${REGUID}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/reguid \ + && chmod a+x /etc/init.d/reguid \ + && ln -s /etc/init.d/reguid /etc/rcD.d/S30reguid diff --git a/ReadMe.txt b/ReadMe.txt new file mode 100644 index 0000000..ab44317 --- /dev/null +++ b/ReadMe.txt @@ -0,0 +1,19 @@ +Welcome to Rx3-Docker/Registry-UI docker image! + + + +This project aims to build a Registry-UI docker image. + +Features: + - Curtently based on rx3-docker/php-apache:1.7.3-mga9 image, + - Sync with Docker-Registry-UI 2.6.0. + + + +Enjoy it! + +Your Rx3 Team. + +-- +arnaud@rx3.net +https://git.rx3.org/gitea/rx3-docker/registry-ui diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt new file mode 100644 index 0000000..581a58c --- /dev/null +++ b/ReleaseNotes.txt @@ -0,0 +1,7 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3-Docker/RoundCubeMail V 1.0.0 - A. GIBERT - 2026/10/30 +------------------------------------------------------------------------------------------------------------------------------------ + +- Initial release, +- Based on rx3-docker/php-apache:1.7.3-mga9 images, +- Use docker-registry-ui 2.6.0. diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..af98c8f --- /dev/null +++ b/compose.yaml @@ -0,0 +1,83 @@ +# Rx3-Docker/Registry-UI Docker Image +#------------------------------------------------------------------------------- + +name: ${HOST_NAME_PREFIX} + +services: + + + +#------------------------------------------------------------------------------- + + webapp: + container_name: ${WA_HOST_NAME} + hostname: ${WA_HOST_NAME} + + image: ${WA_IMG_URL} + + build: + dockerfile: Dockerfile + + args: + IMG_NAME: ${WA_IMG_URL} + IMG_NAME_FULL: ${WA_IMG_NAME_FULL} + IMG_VERSION: ${WA_IMG_VERSION} + IMG_MAINTAINER: ${APPL_MAINTAINER} + IMG_URL: ${WA_IMG_URL} + IMG_FROM_URL: ${WA_IMG_FROM_URL} + + MODULE_NAME: ${WA_MODULE_NAME} + MODULE_PATH: ${WA_MODULE_PATH} + MODULE_VERSION: ${WA_MODULE_VERSION} + + restart: unless-stopped + + environment: + APACHE_UID: ${WA_USER_ID} + APACHE_GID: ${WA_GROUP_ID} + APACHE_DOC_ROOT: /var/www/html + + REGUI_REGISTRY_PROTO: ${WA_REGISTRY_PROTO} + REGUI_REGISTRY_HOST_NAME: ${WA_REGISTRY_HOST_NAME} + REGUI_REGISTRY_PORT: ${WA_REGISTRY_PORT} + + SINGLE_REGISTRY: true + REGISTRY_TITLE: "Docker Registry" + DOCKER_REGISTRY_UI_TITLE: "Docker Registry" + SHOW_CONTENT_DIGEST: true + REGISTRY_SECURED: false + DELETE_IMAGES: yes + SHOW_CATALOG_NB_TAGS: true + + volumes: +# - ./${WA_CONF_EXT}:${WA_CONF_INT} +# - ./${WA_LIB_EXT}:${WA_LIB_INT} + - ./${WA_LOG_INIT_EXT}:${WA_LOG_INIT_INT} + - ./${WA_LOG_SV_EXT}:${WA_LOG_SV_INT} + - ./${WA_LOG_MAIN_EXT}:${WA_LOG_MAIN_INT} + + networks: + - appl + + ports: + - "127.0.0.1:${WA_PORT_SV_EXT}:${WA_PORT_SV_INT}" + - "127.0.0.1:${WA_PORT_MAIN_EXT}:${WA_PORT_MAIN_INT}" + + + +#------------------------------------------------------------------------------- + +networks: + appl: + name: ${NETWORK_NAME} + driver: bridge + driver_opts: + com.docker.network.bridge.name: ${NETWORK_IF_NAME} +# ipam: +# config: +# - subnet: 10.2.33.0/24 +# gateway: 10.2.33.254 + +# internal: +# name: mantisbt-squashtm-internal +# external: true diff --git a/env.dist b/env.dist new file mode 100644 index 0000000..cf709cc --- /dev/null +++ b/env.dist @@ -0,0 +1,100 @@ +# Rx3-Docker/Registry-UI Docker Image +#------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +# Global Settings +#------------------------------------------------------------------------------- + +ORG_NAME="rx3-docker" +ORG_REGISTRY="docker.xor.rx3:5000" +ORG_MAINTAINER='"Arnaud G. GIBERT" ' + + + +#------------------------------------------------------------------------------- +# Image Settings +#------------------------------------------------------------------------------- + +APPL_NAME="registry-ui" +APPL_NAME_FULL="Registry-UI Docker Image" +APPL_NAME_SHORT="regui" +APPL_VERSION="2.6.0" +APPL_MAINTAINER='"Arnaud G. GIBERT" ' + + + +#------------------------------------------------------------------------------- +# User Settings +#------------------------------------------------------------------------------- + +#APPL_ENV="prd" +#APPL_ENV="tst" +#APPL_ENV="int" +APPL_ENV="dvp" + + + +#------------------------------------------------------------------------------- +# Common +#------------------------------------------------------------------------------- + +if [[ "${APPL_ENV}" != "prd" ]] +then + APPL_SUFFIX="-${APPL_ENV}" + PORT_ENV_OFFSET=100 + DOCKER_TOOLS_USER_GROUP_FORCE=TRUE +else + APPL_SUFFIX="" + PORT_ENV_OFFSET=0 + DOCKER_TOOLS_USER_GROUP_FORCE=FALSE +fi + +if [[ "${APPL_ENV}" != "dvp" ]] +then + APPL_USER="apache" +else + APPL_USER="davfs2" +fi + +APPL_GROUP="apache" + +ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}" + + +HOST_NAME_PREFIX=${APPL_NAME_SHORT}${APPL_SUFFIX} + +PORT_SV_INT=9001 +PORT_SV_OFFSET=1000 + +NETWORK_NAME=${HOST_NAME_PREFIX} +NETWORK_IF_NAME=br-${APPL_NAME_SHORT}-${APPL_ENV} + +DOCKER_TOOLS_DEBUG=FALSE +DOCKER_TOOLS_VOLUME=SINGLE +#DOCKER_TOOLS_VOLUME=MERGED +#DOCKER_TOOLS_VOLUME=SPLITED +DOCKER_TOOLS_EXEPTION_LIBS="httpd:/var/www/html postgres:pgsql" + + + +#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+ +# | Variable | Service | Target Image | From Image | Module | Main Port | Admin Port | User | Group | +# | Prefix | Name | URL Prefix | Name | Name Full | Version | URL Prefix | Name | Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id | +#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+ + +docker_service_add WA webapp ${ORG_URL_PREFIX} - "Rx3-Docker/Registry-UI" ${APPL_VERSION}.mga9 ${ORG_URL_PREFIX} php-apache 1.7.3-mga9 httpd - 8083 80 - - ${APPL_USER} ${APPL_GROUP} + + + +#------------------------------------------------------------------------------- +# Web Server +#------------------------------------------------------------------------------- + +#WA_LOG_MIAN_INT=/var/log/httpd +#WA_LOG_MAIN_EXT=.${WA_LOG_INIT_INT} + +#docker_config_add ${WA_CONF_EXT} ${WA_CONF_EXT}.ref + +WA_REGISTRY_PROTO=https +WA_REGISTRY_HOST_NAME=docker.xor.rx3 +WA_REGISTRY_PORT=5000 diff --git a/var/log/httpd/.gitignore b/var/log/httpd/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/log/httpd/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/var/log/init/.gitignore b/var/log/init/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/log/init/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/var/log/supervisor/.gitignore b/var/log/supervisor/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/log/supervisor/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore