Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
~/.dockercfgログイン資格情報が表示されていますが、それはユーザー名ではなくメールアドレスです。実行docker loginするとユーザー名が表示され、変更するように求められます。しかし、ユーザー名を取得してビルド スクリプトに入れることはできますか?
~/.dockercfg
docker login
これはそれを抽出するために機能しますが、技術的には競合状態です。
username="$(sed 's/.*(//;s/).*//' <(docker login & sleep 1; kill %1))"
きっともっと良いものがあります。