mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-11-28 01:08:53 +00:00
offline read docker image add tips
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
This commit is contained in:
parent
683cf95ca7
commit
9cfd1fda2b
9
.docker/docker-entrypoint.sh
Normal file
9
.docker/docker-entrypoint.sh
Normal 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;"
|
3
.github/workflows/ci.yaml
vendored
3
.github/workflows/ci.yaml
vendored
@ -74,6 +74,8 @@ 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 "CMD [\"sh\", \"/docker-entrypoint.sh\"]" >> Dockerfile
|
||||||
|
|
||||||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
|
||||||
@ -82,6 +84,7 @@ jobs:
|
|||||||
docker build -t dockerpracticesig/docker_practice:vuepress \
|
docker build -t dockerpracticesig/docker_practice:vuepress \
|
||||||
--label org.opencontainers.image.revision=$VCS_REF \
|
--label org.opencontainers.image.revision=$VCS_REF \
|
||||||
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
|
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
|
||||||
|
--label maintainer="https://github.com/docker-practice" \
|
||||||
.
|
.
|
||||||
|
|
||||||
docker push dockerpracticesig/docker_practice:vuepress
|
docker push dockerpracticesig/docker_practice:vuepress
|
||||||
|
@ -20,6 +20,8 @@ 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 "CMD [\"sh\", \"/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`
|
||||||
@ -29,6 +31,7 @@ after_success:
|
|||||||
-t dockerpracticesig/docker_practice:gitbook \
|
-t dockerpracticesig/docker_practice:gitbook \
|
||||||
--label org.opencontainers.image.revision=$VCS_REF \
|
--label org.opencontainers.image.revision=$VCS_REF \
|
||||||
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
|
--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
|
- docker run -dit --rm -p 4000:80 dockerpracticesig/docker_practice
|
||||||
|
Loading…
Reference in New Issue
Block a user