eval $(ssh-agent) &> /dev/null
ssh-add /root/.ssh/id_rsa &> /dev/null

export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:/tiup-cluster/bin

if [ -d "/mirrors" ]; then
    export TIUP_MIRRORS=/mirrors
fi

# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'

mkdir -p ~/.tiup/bin
[[ -f ~/.tiup/bin/root.json ]] || curl "https://tiup-mirrors.pingcap.com/root.json" > ~/.tiup/bin/root.json

cat <<EOF
Welcome to tiup-cluster on Docker
===========================

This container runs the tiup-cluster tests in sub-containers.

You are currently in the base dir of the git repo for tiup-cluster.

Run \`tiup-cluster\` to play with tiup-cluster.

To run the test:
   ./tests/tiup-cluster/run.sh
   ...
EOF

cd /tiup-cluster
