reverse-proxy-frontend/private/Docker.txt

40 lines
1.2 KiB
Plaintext
Raw Normal View History

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