This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
технология_docker [2025/03/01 16:38] val [Создание образа для приложения с использованием Dockerfile] |
технология_docker [2025/03/04 11:46] (current) val [Инструмент kaniko] |
||
---|---|---|---|
Line 276: | Line 276: | ||
#COPY --chown=myuser:myuser app.py . | #COPY --chown=myuser:myuser app.py . | ||
- | #COPY --chown=myuser:myuser etc/pywebd/ /etc/pywebd/ | + | ### COPY --chown=myuser:myuser etc/pywebd/ /etc/pywebd/ |
- | #COPY --chown=myuser:myuser index.html /var/www/ | + | ### COPY --chown=myuser:myuser index.html /var/www/ |
### ADD www.tgz /var/ | ### ADD www.tgz /var/ | ||
Line 292: | Line 292: | ||
:~/pywebd$ ### docker run -p 4443 -d --rm pywebd | :~/pywebd$ ### docker run -p 4443 -d --rm pywebd | ||
- | :~/pywebd$ docker run -d --rm -p 4088 -e PYWEBD_PORT=4443 -v /etc/pywebd:/etc/pywebd -v /var/www/:/var/www/ --name pywebd01 pywebd | + | :~/pywebd$ docker run -d --rm -p 4088 -e PYWEBD_PORT=4088 -v /etc/pywebd:/etc/pywebd -v /var/www/:/var/www/ --name pywebd01 pywebd |
</code> | </code> | ||
Line 669: | Line 669: | ||
<code> | <code> | ||
~/gowebd# time docker run \ | ~/gowebd# time docker run \ | ||
- | -v $(pwd):/workspace --rm\ | + | -v $(pwd):/workspace \ |
+ | -v ~/.docker/config.json:/kaniko/.docker/config.json \ | ||
gcr.io/kaniko-project/executor:latest \ | gcr.io/kaniko-project/executor:latest \ | ||
- | --skip-tls-verify --log-timestamp\ | + | --skip-tls-verify --log-timestamp \ |
--dockerfile=./Dockerfile \ | --dockerfile=./Dockerfile \ | ||
--context=/workspace \ | --context=/workspace \ | ||
- | --destination=server.corp13.un:5000/student/gowebd \ | + | --destination=server.corpX.un:5000/student/gowebd |
- | --cache=true --cache-copy-layers --cache-repo server.corp13.un:5000/dev-cache --use-new-run \ | + | |
- | --verbosity debug | + | |
</code><code> | </code><code> | ||
или, интерактивно: | или, интерактивно: | ||
Line 682: | Line 681: | ||
root@ubuntu:~/gowebd# docker run -it \ | root@ubuntu:~/gowebd# docker run -it \ | ||
-v $(pwd):/workspace --rm --entrypoint "/bin/sh" \ | -v $(pwd):/workspace --rm --entrypoint "/bin/sh" \ | ||
+ | -v ~/.docker/config.json:/kaniko/.docker/config.json \ | ||
gcr.io/kaniko-project/executor:debug | gcr.io/kaniko-project/executor:debug | ||
Line 687: | Line 687: | ||
--dockerfile=./Dockerfile \ | --dockerfile=./Dockerfile \ | ||
--context=/workspace \ | --context=/workspace \ | ||
- | --destination=server.corp13.un:5000/student/gowebd | + | --destination=server.corpX.un:5000/student/gowebd |
</code><code> | </code><code> | ||
тестируем результат: | тестируем результат: | ||
</code><code> | </code><code> | ||
# docker run --pull=always --name gowebd -itd --rm \ | # docker run --pull=always --name gowebd -itd --rm \ | ||
- | -p 8000:80 server.corp13.un:5000/student/gowebd | + | -p 8000:80 server.corpX.un:5000/student/gowebd |
</code> | </code> | ||
==== Приложение apwebd ==== | ==== Приложение apwebd ==== |