SHARE
TWEET

Untitled

a guest Oct 9th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. docker_lazy_login() {
  2.   [[ "$1" == "-c" ]] && echo "\0" | docker login &>/dev/null && return
  3.  
  4.   if [[ -n "${DOCKER_PASSWORD}" ]]; then
  5.     docker login -u "${DOCKER_USER}" -p "${DOCKER_PASSWORD}"
  6.   elif [[ -n "${DOCKER_USER}" ]]; then
  7.     echo "Attempting docker login, found user $DOCKER_USER. Just need password"
  8.     docker login -u "${DOCKER_USER}"
  9.   else
  10.     echo "Attempting docker login"
  11.     docker login
  12.   fi
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top