From 2451b8ed1009f4be74d4f1f845017ab2354cd215 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Wed, 9 Jun 2021 19:41:40 +0300 Subject: [PATCH] docker notes update --- .../NetworkResurrector.Api/Notes/Docker.txt | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/api/NetworkResurrector.Api/Notes/Docker.txt b/src/api/NetworkResurrector.Api/Notes/Docker.txt index 5dfb8b6..c8e3558 100644 --- a/src/api/NetworkResurrector.Api/Notes/Docker.txt +++ b/src/api/NetworkResurrector.Api/Notes/Docker.txt @@ -3,32 +3,37 @@ Create image: --from solution folder: -docker image build -t "network-resurrector-api:1.0.0" -f "src/api/NetworkResurrector.Api/Dockerfile" . +docker image build -t "network-resurrector-api:1.0.1" -f "src/api/NetworkResurrector.Api/Dockerfile" . Run image: -docker run -p 5053:80 -it network-resurrector-api:1.0.0 +docker run -p 5053:80 -it network-resurrector-api:1.0.1 Push image to registry: --tag image -docker tag network-resurrector-api:1.0.0 alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.0 +docker tag network-resurrector-api:1.0.1 alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.1 --login to registry docker login --username=admin --password="***REMOVED***" alpine-nexus:8500 --push image -docker push alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.0 +docker push alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.1 Pull image from registry --login to registry --pull image -docker pull alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.0 +docker pull alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.1 + +Stop old container +docker stop network-resurrector-api +docker rm network-resurrector-api Run container in prod env -docker run -d --name network-resurrector-api --restart=always -p 5008:80 alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.0 +docker run -d --name network-resurrector-api --restart=always -p 5008:80 alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.1 + +Remove old image +docker rmi alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.0 -Rename container -docker rename network-resurrector-api ####################################################################################################################################################### -Docker container last version: 1.0.0 +Docker container last version: 1.0.1 ############################################################################################## \ No newline at end of file