diff --git a/docker-entrypoint-dind.sh b/docker-entrypoint-dind.sh index 6359ecb..9ef1738 100755 --- a/docker-entrypoint-dind.sh +++ b/docker-entrypoint-dind.sh @@ -11,7 +11,12 @@ if [ -n "$DOCKERHUB_USER" ] && [ -n "$DOCKERHUB_PASS" ]; then gosu jenkins mkdir $HOME/.m2 gosu jenkins j2 "$SETTINGS_TPL" > $SETTINGS_FILE docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASS + mkdir -p /var/jenkins_home/worker/.docker + cp /root/.docker/config.json /var/jenkins_home/worker/.docker/config.json + chown -R jenkins:jenkins /var/jenkins_home/worker/.docker fi +#clean up workspace +rm -rf /var/jenkins_home/worker/workspace/* exec /docker-entrypoint.sh "$@"