User Tools

Site Tools


технология_docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
технология_docker [2022/07/04 19:08]
val [docker-compose]
технология_docker [2022/07/14 08:41]
val [GitLab репозиторий]
Line 158: Line 158:
 COPY start.sh / COPY start.sh /
 COPY webd /​usr/​local/​sbin/​webd COPY webd /​usr/​local/​sbin/​webd
-### ADD www.tgz /var/     ​#for simple test in k8s+### ADD www.tgz /var/          #for simple ​test in k8s 
 +###COPY index.html /​var/​www/ ​  #test in k8s
  
 EXPOSE 80 EXPOSE 80
Line 299: Line 300:
 # docker volume rm root_vol1 # docker volume rm root_vol1
 </​code>​ </​code>​
-===== Дополнительные материалы ===== 
  
-==== Локальный репозиторий ==== +===== Репозиторий =====
- +
- * [[https://​docs.docker.com/​registry/​|Docker Registry]] +
- +
-<​code>​ +
-gate# docker run -d -p 5000:5000 -v /​root:/​certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/​certs/​gate.crt -e REGISTRY_HTTP_TLS_KEY=/​certs/​gate.key --name registry registry:​2 +
- +
-node1# cp ~vagrant/​gate.crt /​etc/​docker/​certs.d/​gate.corp13.un\:​5000/​ca.crt +
- +
-node1# service docker restart +
- +
-node1# docker tag val/​webd:​latest gate.corp13.un:​5000/​webd +
- +
-node1# docker push gate.corp13.un:​5000/​webd +
- +
-node1# curl --insecure -X GET https://​gate.corp13.un:​5000/​v2/​_catalog +
-{"​repositories":​["​webd"​]} +
-</​code>​+
  
 ==== GitLab репозиторий ==== ==== GitLab репозиторий ====
Line 343: Line 326:
 # docker push server.corpX.un:​5000/​student/​webd:​wwwdir # docker push server.corpX.un:​5000/​student/​webd:​wwwdir
 ... ...
-# docker run --name webd01 --hostname webd01 -itd -p 8000:80 server.corp13.un:​5000/​student/​webd:​wwwdir+# docker run --name webd01 --hostname webd01 -itd --rm -p 8000:80 server.corpX.un:​5000/​student/​webd 
 +</​code>​ 
 + 
 +==== Локальный репозиторий ==== 
 + 
 + * [[https://​docs.docker.com/​registry/​|Docker Registry]] 
 + 
 +<​code>​ 
 +gate# docker run -d -p 5000:5000 -v /​root:/​certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/​certs/​gate.crt -e REGISTRY_HTTP_TLS_KEY=/​certs/​gate.key --name registry registry:​2 
 + 
 +node1# cp ~vagrant/​gate.crt /​etc/​docker/​certs.d/​gate.corp13.un\:​5000/​ca.crt 
 + 
 +node1# service docker restart 
 + 
 +node1# docker tag val/​webd:​latest gate.corp13.un:​5000/​webd 
 + 
 +node1# docker push gate.corp13.un:​5000/​webd 
 + 
 +node1# curl --insecure -X GET https://​gate.corp13.un:​5000/​v2/​_catalog 
 +{"​repositories":​["​webd"​]}
 </​code>​ </​code>​
  
технология_docker.txt · Last modified: 2024/05/14 16:52 by val