From 911ce1a2e4e345b95962e16571ffafb114b111a3 Mon Sep 17 00:00:00 2001 From: Kang Huaishuai Date: Fri, 3 Jul 2020 12:10:24 +0800 Subject: [PATCH] Fixed #454 Signed-off-by: Kang Huaishuai --- .docker/docker-entrypoint.sh | 0 .github/workflows/ci.yaml | 6 +++++- .travis.yml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) mode change 100644 => 100755 .docker/docker-entrypoint.sh diff --git a/.docker/docker-entrypoint.sh b/.docker/docker-entrypoint.sh old mode 100644 new mode 100755 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1f86ec3..cb310cb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -75,7 +75,7 @@ jobs: echo "FROM nginx:alpine" >> Dockerfile echo "COPY .vuepress/dist /usr/share/nginx/html" >> Dockerfile echo "COPY .docker/docker-entrypoint.sh /" >> Dockerfile - echo "CMD [\"sh\", \"/docker-entrypoint.sh\"]" >> Dockerfile + echo "ENTRYPOINT [\"/docker-entrypoint.sh\"]" >> Dockerfile echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin @@ -88,6 +88,10 @@ jobs: . docker push dockerpracticesig/docker_practice:vuepress + + docker run -it --rm -d -p 4000:80 dockerpracticesig/docker_practice:vuepress + + curl 127.0.0.1:4000 env: DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} diff --git a/.travis.yml b/.travis.yml index 419c1a5..3f12f43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ after_success: - echo "FROM nginx:alpine" >> Dockerfile - echo "COPY _book /usr/share/nginx/html" >> Dockerfile - echo "COPY .docker/docker-entrypoint.sh /" >> Dockerfile -- echo "CMD [\"sh\", \"/docker-entrypoint.sh\"]" >> Dockerfile +- echo "ENTRYPOINT [\"/docker-entrypoint.sh\"]" >> Dockerfile - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - export VCS_REF=`git rev-parse --short HEAD`