offline read docker image add tips

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
This commit is contained in:
Kang Huaishuai 2020-04-28 23:26:55 +08:00
parent 683cf95ca7
commit 9cfd1fda2b
No known key found for this signature in database
GPG Key ID: 5E515022F565DA09
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#!/usr/bin/env sh
echo
echo
echo "Please open your browser: 127.0.0.1:4000"
echo
echo
exec nginx -g "daemon off;"

View File

@ -74,6 +74,8 @@ 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 "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
@ -82,6 +84,7 @@ jobs:
docker build -t dockerpracticesig/docker_practice:vuepress \
--label org.opencontainers.image.revision=$VCS_REF \
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
--label maintainer="https://github.com/docker-practice" \
.
docker push dockerpracticesig/docker_practice:vuepress

View File

@ -20,6 +20,8 @@ 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 "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export VCS_REF=`git rev-parse --short HEAD`
@ -29,6 +31,7 @@ after_success:
-t dockerpracticesig/docker_practice:gitbook \
--label org.opencontainers.image.revision=$VCS_REF \
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
--label maintainer="https://github.com/docker-practice" \
.
- docker run -dit --rm -p 4000:80 dockerpracticesig/docker_practice