Skip to content

Commit

Permalink
feat: add custom registry option
Browse files Browse the repository at this point in the history
  • Loading branch information
capuche2412 committed Jan 31, 2024
1 parent 834d3b5 commit 8a6e29c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,7 @@ CLUSTER_EXTRA_NODES="
## Private Registry
An access to a private registry is possible with the environment variables :` $CI_REGISTRY` `$CI_REGISTRY_USER` and `$CI_REGISTRY_PASSWORD`.
For GitLab, the variables are predifined.
An access to GitLab private registry is possible with the environment variables :`$CI_REGISTRY` `$CI_REGISTRY_USER` and `$CI_REGISTRY_PASSWORD`.
the variables are predefined.

For a custom private registry, an access is possible by providing the variables : `$CI_CUSTOM_REGISTRY` `$CI_CUSTOM_REGISTRY_USER` and `$CI_CUSTOM_REGISTRY_PASSWORD`.
5 changes: 5 additions & 0 deletions docker/24-dind/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ if [ -n "$CI_REGISTRY" ] && [ -n "$CI_REGISTRY_USER" ] && [ -n "$CI_REGISTRY_PAS
docker login $CI_REGISTRY -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}"
fi

if [ -n "$CI_CUSTOM_REGISTRY" ] && [ -n "$CI_CUSTOM_REGISTRY_USER" ] && [ -n "$CI_CUSTOM_REGISTRY_PASSWORD" ]; then
echo "Logging to ${CI_CUSTOM_REGISTRY} with user ${CI_REGISTRY_USER}"
docker login $CI_CUSTOM_REGISTRY -u "${CI_CUSTOM_REGISTRY_USER}" -p "${CI_CUSTOM_REGISTRY_PASSWORD}"
fi

if [ -z "$CLUSTER_NAME" ]; then
export CLUSTER_NAME="kind"
echo "Defaulting cluster name to ${CLUSTER_NAME}"
Expand Down

0 comments on commit 8a6e29c

Please sign in to comment.