parent
8b186fb7e7
commit
911ce1a2e4
|
@ -75,7 +75,7 @@ jobs:
|
||||||
echo "FROM nginx:alpine" >> Dockerfile
|
echo "FROM nginx:alpine" >> Dockerfile
|
||||||
echo "COPY .vuepress/dist /usr/share/nginx/html" >> Dockerfile
|
echo "COPY .vuepress/dist /usr/share/nginx/html" >> Dockerfile
|
||||||
echo "COPY .docker/docker-entrypoint.sh /" >> 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
|
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
|
||||||
|
@ -88,6 +88,10 @@ jobs:
|
||||||
.
|
.
|
||||||
|
|
||||||
docker push dockerpracticesig/docker_practice:vuepress
|
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:
|
env:
|
||||||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
|
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
|
||||||
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
|
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
|
||||||
|
|
|
@ -21,7 +21,7 @@ after_success:
|
||||||
- echo "FROM nginx:alpine" >> Dockerfile
|
- echo "FROM nginx:alpine" >> Dockerfile
|
||||||
- echo "COPY _book /usr/share/nginx/html" >> Dockerfile
|
- echo "COPY _book /usr/share/nginx/html" >> Dockerfile
|
||||||
- echo "COPY .docker/docker-entrypoint.sh /" >> 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
|
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
- export VCS_REF=`git rev-parse --short HEAD`
|
- export VCS_REF=`git rev-parse --short HEAD`
|
||||||
|
|
Loading…
Reference in New Issue