diff --git a/.travis.yml b/.travis.yml index 210d7e6..7a68a80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ after_success: - sudo chmod -R 777 _book - echo "FROM nginx:1.13.8-alpine" >> Dockerfile - echo "COPY _book /usr/share/nginx/html" >> Dockerfile -- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" +- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker build -t dockerpracticecn/docker_practice . - docker run -dit --rm -p 4000:80 dockerpracticecn/docker_practice - sleep 5