fix docker-registry
Some checks failed
Test and Publish Templates / test-and-publish (push) Failing after 11s
Some checks failed
Test and Publish Templates / test-and-publish (push) Failing after 11s
This commit is contained in:
@@ -3,5 +3,5 @@
|
|||||||
# These are used across backup, restore, create, and destroy operations
|
# These are used across backup, restore, create, and destroy operations
|
||||||
|
|
||||||
get_registry_volumes() {
|
get_registry_volumes() {
|
||||||
echo "volume:data:${DATA_VOLUME}"
|
echo "path:data:${DATA_PATH}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,4 +9,8 @@ SSH_USER="root"
|
|||||||
# Registry port (default: 5000)
|
# Registry port (default: 5000)
|
||||||
REGISTRY_PORT=5000
|
REGISTRY_PORT=5000
|
||||||
|
|
||||||
|
# Data path - stores all registry data (images, blobs, etc.)
|
||||||
|
# Override this to store data in a custom location
|
||||||
|
DATA_PATH="${SERVICE_PATH}/data"
|
||||||
|
|
||||||
TEMPLATE=docker-registry
|
TEMPLATE=docker-registry
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "DATA_VOLUME" "CONFIG_PATH" "REGISTRY_PORT"
|
_check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "DATA_PATH" "CONFIG_PATH" "REGISTRY_PORT"
|
||||||
|
|
||||||
# START SCRIPT
|
# START SCRIPT
|
||||||
# The start script is required for all templates.
|
# The start script is required for all templates.
|
||||||
@@ -10,11 +10,14 @@ if [ ! -f "${CONFIG_PATH}/htpasswd" ]; then
|
|||||||
_die "htpasswd file not found in ${CONFIG_PATH}/htpasswd - see README.txt for instructions"
|
_die "htpasswd file not found in ${CONFIG_PATH}/htpasswd - see README.txt for instructions"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create data directory if it doesn't exist
|
||||||
|
_create_folder "${DATA_PATH}"
|
||||||
|
|
||||||
DOCKER_RUN_CMD="docker run -d \
|
DOCKER_RUN_CMD="docker run -d \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
--name ${CONTAINER_NAME} \
|
--name ${CONTAINER_NAME} \
|
||||||
-p ${REGISTRY_PORT}:5000 \
|
-p ${REGISTRY_PORT}:5000 \
|
||||||
-v ${DATA_VOLUME}:/var/lib/registry \
|
-v ${DATA_PATH}:/var/lib/registry \
|
||||||
-v ${CONFIG_PATH}/htpasswd:/auth/htpasswd:ro \
|
-v ${CONFIG_PATH}/htpasswd:/auth/htpasswd:ro \
|
||||||
-e REGISTRY_AUTH=htpasswd \
|
-e REGISTRY_AUTH=htpasswd \
|
||||||
-e REGISTRY_AUTH_HTPASSWD_REALM=Registry \
|
-e REGISTRY_AUTH_HTPASSWD_REALM=Registry \
|
||||||
|
|||||||
@@ -12,5 +12,5 @@ REQUIRES_DOCKER_ROOT=false
|
|||||||
IMAGE_REGISTRY="docker.io"
|
IMAGE_REGISTRY="docker.io"
|
||||||
IMAGE_REPO="library/registry"
|
IMAGE_REPO="library/registry"
|
||||||
|
|
||||||
# Volume settings - stores all registry data (images, blobs, etc.)
|
# Path settings - stores all registry data (images, blobs, etc.)
|
||||||
DATA_VOLUME="${CONTAINER_NAME}_data"
|
DATA_PATH="${SERVICE_PATH}/data"
|
||||||
|
|||||||
Reference in New Issue
Block a user