mirror of
https://github.com/openfaas/faas.git
synced 2025-06-26 00:33:25 +00:00
16 lines
366 B
Bash
Executable File
16 lines
366 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
IMAGE_REGISTRY=$1
|
|
|
|
if [ "$IMAGE_REGISTRY" = "quay.io" ] ; then
|
|
USERNAME=$QUAY_USERNAME
|
|
PASSWORD=$QUAY_PASSWORD
|
|
elif [ "$IMAGE_REGISTRY" = "docker.io" ] ; then
|
|
USERNAME=$DOCKER_USERNAME
|
|
PASSWORD=$DOCKER_PASSWORD
|
|
fi
|
|
|
|
echo "Attempting to log in to $IMAGE_REGISTRY"
|
|
echo $PASSWORD | docker login -u=$USERNAME --password-stdin $IMAGE_REGISTRY;
|