Add support for Docker registry credentials in entrypoint script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -887,6 +887,12 @@ upgrade_scheduler() {
|
|||||||
SET_DEBUG_MODE=""
|
SET_DEBUG_MODE=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$DOCKER_REGISTRY_USERNAME"] && [ -n "$DOCKER_REGISTRY_PASSWORD" ]; then
|
||||||
|
DOCKER_REGISTRY_ENVS="--env DOCKER_REGISTRY_USERNAME=$DOCKER_REGISTRY_USERNAME --env DOCKER_REGISTRY_PASSWORD=$DOCKER_REGISTRY_PASSWORD"
|
||||||
|
else
|
||||||
|
DOCKER_REGISTRY_ENVS=""
|
||||||
|
fi
|
||||||
|
|
||||||
FRAMEWORK_SCHEDULER_NAME="$FRAMEWORK_SCHEDULER_NAME-$(head /dev/urandom | tr -dc '0-9' | head -c 6)"
|
FRAMEWORK_SCHEDULER_NAME="$FRAMEWORK_SCHEDULER_NAME-$(head /dev/urandom | tr -dc '0-9' | head -c 6)"
|
||||||
|
|
||||||
DOCKER_RUN="/usr/bin/docker run -d \
|
DOCKER_RUN="/usr/bin/docker run -d \
|
||||||
@@ -900,6 +906,7 @@ upgrade_scheduler() {
|
|||||||
-v USER_SECRET:/etc/user/secret \
|
-v USER_SECRET:/etc/user/secret \
|
||||||
--restart=always \
|
--restart=always \
|
||||||
--name $FRAMEWORK_SCHEDULER_NAME \
|
--name $FRAMEWORK_SCHEDULER_NAME \
|
||||||
|
$DOCKER_REGISTRY_ENVS \
|
||||||
$SET_DEBUG_MODE \
|
$SET_DEBUG_MODE \
|
||||||
--env WEBSERVER_PORT=$WEBSERVER_PORT \
|
--env WEBSERVER_PORT=$WEBSERVER_PORT \
|
||||||
--network $FRAMEWORK_SCHEDULER_NETWORK \
|
--network $FRAMEWORK_SCHEDULER_NETWORK \
|
||||||
|
Reference in New Issue
Block a user