login dockerhub before pull (#8314)

This commit is contained in:
William Cheng 2021-01-04 13:36:34 +08:00 committed by GitHub
parent 08fc5bb38f
commit caf52641f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,6 +76,7 @@ before_install:
# set python 3.6.3 as default
- source ~/virtualenv/python3.6/bin/activate
# to run petstore server locally via docker
- echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin;
- docker pull swaggerapi/petstore
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
- docker ps -a