Last active
June 23, 2022 05:52
-
-
Save akagaeng/8c779f2280615942c860c8c35f02e561 to your computer and use it in GitHub Desktop.
Docker login shell script, passing password with pipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
USERNAME=<DOCKER USERNAME> | |
PASSWORD=<DOCKER PASSWORD> # alternatively, use access tokens. See https://docs.docker.com/docker-hub/access-tokens/ | |
echo $PASSWORD | docker login -u $USERNAME --password-stdin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment