mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
tools/alpine: Fix push-manifest.sh
- On macOS, docker-credential-osxkeychain.bin was renamed to docker-credential-osxkeychain - Pass --ignore-missing to the manifest-tool invocation. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
2a984165fb
commit
03c3fd65c3
@ -46,7 +46,12 @@ EOF
|
|||||||
# we need them for notary on all platforms.
|
# we need them for notary on all platforms.
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
Darwin)
|
Darwin)
|
||||||
|
# Prior to 2018-03-27 D4M used a .bin suffix on the keychain utility binary name. Support the old name for a while
|
||||||
|
if [ -f /Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain.bin ]; then
|
||||||
CRED=$(echo "https://index.docker.io/v1/" | /Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain.bin get)
|
CRED=$(echo "https://index.docker.io/v1/" | /Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain.bin get)
|
||||||
|
else
|
||||||
|
CRED=$(echo "https://index.docker.io/v1/" | /Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain get)
|
||||||
|
fi
|
||||||
USER=$(echo "$CRED" | jq -r '.Username')
|
USER=$(echo "$CRED" | jq -r '.Username')
|
||||||
PASS=$(echo "$CRED" | jq -r '.Secret')
|
PASS=$(echo "$CRED" | jq -r '.Secret')
|
||||||
MT_ARGS="--username $USER --password $PASS"
|
MT_ARGS="--username $USER --password $PASS"
|
||||||
@ -65,7 +70,7 @@ case $(uname -s) in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Push manifest list
|
# Push manifest list
|
||||||
OUT=$(manifest-tool $MT_ARGS push from-spec "$YAML")
|
OUT=$(manifest-tool $MT_ARGS push from-spec --ignore-missing "$YAML")
|
||||||
rm "$YAML"
|
rm "$YAML"
|
||||||
echo "$OUT"
|
echo "$OUT"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user