2021-05-16 18:20:23 +03:00
|
|
|
##############################################################################################
|
|
|
|
Docker commands:
|
|
|
|
*****************
|
|
|
|
|
|
|
|
Create image:
|
|
|
|
--from solution folder:
|
2021-06-25 19:13:25 +03:00
|
|
|
docker image build -t "reverse-proxy-frontend:1.0.2" .
|
2021-05-16 18:20:23 +03:00
|
|
|
|
|
|
|
Run image:
|
2021-06-25 19:13:25 +03:00
|
|
|
docker run -p 5055:80 -it reverse-proxy-frontend:1.0.2
|
2021-05-16 18:20:23 +03:00
|
|
|
|
|
|
|
Push image to registry:
|
|
|
|
--tag image
|
2021-06-25 19:13:25 +03:00
|
|
|
docker tag reverse-proxy-frontend:1.0.2 alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.2
|
2021-05-16 18:20:23 +03:00
|
|
|
|
|
|
|
--login to registry
|
|
|
|
docker login --username=admin --password="***REMOVED***" alpine-nexus:8500
|
|
|
|
|
|
|
|
--push image
|
2021-06-25 19:13:25 +03:00
|
|
|
docker push alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.2
|
2021-05-16 18:20:23 +03:00
|
|
|
|
|
|
|
Pull image from registry
|
|
|
|
--login to registry
|
|
|
|
|
|
|
|
--pull image
|
2021-06-25 19:13:25 +03:00
|
|
|
docker pull alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.2
|
2021-05-16 18:20:23 +03:00
|
|
|
|
|
|
|
Stop old container
|
2021-06-25 19:13:25 +03:00
|
|
|
docker stop reverse-proxy-frontend && docker rm reverse-proxy-frontend
|
2021-05-16 18:20:23 +03:00
|
|
|
|
|
|
|
Run container in prod env
|
2021-06-25 19:13:25 +03:00
|
|
|
docker run -d --name reverse-proxy-frontend --restart=always -p 5005:80 alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.2
|
2021-05-16 18:20:23 +03:00
|
|
|
|
|
|
|
Remove old image
|
2021-06-25 19:13:25 +03:00
|
|
|
docker rmi alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.1
|
2021-05-16 18:20:23 +03:00
|
|
|
|
|
|
|
Get container logs
|
|
|
|
docker logs reverse-proxy-frontend
|
|
|
|
##############################################################################################
|