diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 26d2570..e7766e8 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -15,11 +15,11 @@ on: workflow_dispatch: env: - REGISTRY_URL: "docker.io" # docker.io or other registry URL, DOCKER_REGISTRY_USER/DOCKER_REGISTRY_PASSWORD to be set in CI env. + REGISTRY_URL: "docker.io" # docker.io or other registry URL, DOCKER_REGISTRY_USERNAME/DOCKER_REGISTRY_PASSWORD to be set in CI env. BUILDKIT_PROGRESS: "plain" # Full logs for CI build. - # DOCKER_REGISTRY_USER and DOCKER_REGISTRY_PASSWORD is required for docker image push, they should be set in CI secrets. - DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }} + # DOCKER_REGISTRY_USERNAME and DOCKER_REGISTRY_PASSWORD is required for docker image push, they should be set in CI secrets. + DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }} DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} # used to sync image to mirror registry diff --git a/docker_dev_box/hub.Dockerfile b/docker_dev_box/hub.Dockerfile index 9f645bb..ed5950a 100644 --- a/docker_dev_box/hub.Dockerfile +++ b/docker_dev_box/hub.Dockerfile @@ -15,6 +15,7 @@ COPY work /opt/utils/ # Setup JupyterHub RUN source /opt/utils/script-devbox-jupyter.sh \ + && mv /opt/utils/start-*.sh /usr/local/bin/ && chmod +x /usr/local/bin/start-*.sh \ && for profile in $(echo $ARG_PROFILE_JUPYTER | tr "," "\n") ; do ( setup_jupyter_${profile} || true ) ; done \ # If not keeping NodeJS, remove NoedJS to reduce image size, and install Traefik instead && ${ARG_KEEP_NODEJS:-true} || ( \ diff --git a/docker_dev_box/work/start-jupyterhub.sh b/docker_dev_box/work/start-jupyterhub.sh index 7beb19f..c72df39 100644 --- a/docker_dev_box/work/start-jupyterhub.sh +++ b/docker_dev_box/work/start-jupyterhub.sh @@ -1,4 +1,9 @@ #!/bin/bash +[ $BASH ] && [ -f /etc/profile ] && [ -z $ENTER_PROFILE ] && . /etc/profile + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -jupyterhub $* +# echo "DIR=${DIR}" +# ls -alh + +python -m jupyterhub $* diff --git a/docker_dev_box/work/start-notebook.sh b/docker_dev_box/work/start-notebook.sh index d1b53a8..a525062 100644 --- a/docker_dev_box/work/start-notebook.sh +++ b/docker_dev_box/work/start-notebook.sh @@ -1,4 +1,6 @@ #!/bin/bash +[ $BASH ] && [ -f /etc/profile ] && [ -z $ENTER_PROFILE ] && . /etc/profile + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" . $DIR/start--pre.sh diff --git a/docker_dev_box/work/start-singleuser.sh b/docker_dev_box/work/start-singleuser.sh index 7ebf9a9..8c9a609 100644 --- a/docker_dev_box/work/start-singleuser.sh +++ b/docker_dev_box/work/start-singleuser.sh @@ -1,4 +1,6 @@ #!/bin/bash +[ $BASH ] && [ -f /etc/profile ] && [ -z $ENTER_PROFILE ] && . /etc/profile + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" . $DIR/start--pre.sh diff --git a/tool.sh b/tool.sh index 639212b..afdc148 100644 --- a/tool.sh +++ b/tool.sh @@ -58,7 +58,7 @@ push_image() { KEYWORD="${1:-second}"; docker image prune --force && docker images | sort; IMAGES=$(docker images | grep "${KEYWORD}" | awk '{print $1 ":" $2}') ; - echo "$DOCKER_REGISTRY_PASSWORD" | docker login "${REGISTRY_URL}" -u "$DOCKER_REGISTRY_USER" --password-stdin ; + echo "$DOCKER_REGISTRY_PASSWORD" | docker login "${REGISTRY_URL}" -u "$DOCKER_REGISTRY_USERNAME" --password-stdin ; for IMG in $(echo "${IMAGES}" | tr " " "\n") ; do docker push "${IMG}";