harbor/tests/apitests/python/update_docker_cfg.sh
danfengliu 4d501030b6 Add docker access credential to avoid access limitaton by docker-hub
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-11-29 17:20:47 +08:00

8 lines
282 B
Bash
Executable File

#!/bin/sh
if [ $(cat /$HOME/.docker/config.json |grep experimental |wc -l) -eq 0 ];then
sudo sed -i '$d' /$HOME/.docker/config.json
sudo sed -i '$d' /$HOME/.docker/config.json
sudo echo -e "},\n \"experimental\": \"enabled\"\n}" >> /$HOME/.docker/config.json
fi