reverse-proxy-frontend/private/Docker.txt

39 lines
1.2 KiB
Plaintext

##############################################################################################
Docker commands:
*****************
Create image:
--from solution folder:
docker image build -t "reverse-proxy-frontend:1.0.5" .
Run image:
docker run -p 5055:80 -it reverse-proxy-frontend:1.0.5
Push image to registry:
--tag image
docker tag reverse-proxy-frontend:1.0.5 alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.5
--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.5
Pull image from registry
--login to registry
--pull image
docker pull alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.5
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.5
Remove old image
docker rmi alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.4
Get container logs
docker logs reverse-proxy-frontend
##############################################################################################