1

The problem is docker login creds take password directly in command option which is insecure. Commands get logged in event log for process creation or powershell or bash can be configured to log all of the script text. This can lead to creds getting leaked. So My question is how can i pass the secret to docker login without passing it directly in command line. I can't find any option in docker login that takes a file which has creds.

2 Answers 2

1
cat ~/my_password.txt | docker login --username foo --password-stdin
Sign up to request clarification or add additional context in comments.

Comments

0

In one of the latest Teamcity you can create connection where you specify password (which is then invisible) and then using Build features you can use this connection to login before build process begins.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.