From 8c8aa4b9ed2f0dff6dd896119fdaab2028695bd2 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Fri, 25 Jun 2021 19:13:25 +0300 Subject: [PATCH] docker notes update --- private/Docker.txt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/private/Docker.txt b/private/Docker.txt index 72847f0..762cbca 100644 --- a/private/Docker.txt +++ b/private/Docker.txt @@ -4,36 +4,35 @@ Docker commands: Create image: --from solution folder: -docker image build -t "reverse-proxy-frontend:1.0.1" . +docker image build -t "reverse-proxy-frontend:1.0.2" . Run image: -docker run -p 5055:80 -it reverse-proxy-frontend:1.0.1 +docker run -p 5055:80 -it reverse-proxy-frontend:1.0.2 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 +docker tag reverse-proxy-frontend:1.0.2 alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.2 --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 +docker push alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.2 Pull image from registry --login to registry --pull image -docker pull alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.1 +docker pull alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.2 Stop old container -docker stop reverse-proxy-frontend -docker rm reverse-proxy-frontend +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 +docker run -d --name reverse-proxy-frontend --restart=always -p 5005:80 alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.2 Remove old image -docker rmi alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.0 +docker rmi alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.1 Get container logs docker logs reverse-proxy-frontend