semaphoreci/agent

Docker Password with special shell characters prevents docker login for Compose Style

Closed this issue · 0 comments

Example:

If the password contains a shell quote, e.g: hello"dasda@das#adasda, our approach of providing the password breaks the shell:

echo "hello"dasda@das#adasda" | docker login ...

Two solutions I see in this situation:

  1. base64 while injecting, and dynamical decode in the machine
  2. Store to a file, do cat passord_file.txt | docker login...

Will have to test the two approaches to figure out which is the best one to use.