docker notes update

master
Tudor Stanciu 2021-05-15 03:50:05 +03:00
parent 9498033838
commit c40c6b3881
1 changed files with 8 additions and 9 deletions

View File

@ -14,30 +14,29 @@ Docker commands:
Create image: Create image:
--from solution folder: --from solution folder:
docker image build -t "reverse-proxy-frontend:1.0.4" . docker image build -t "reverse-proxy-frontend:1.0.0" .
Run image: Run image:
docker run -p 5055:80 -it reverse-proxy-frontend:1.0.4 docker run -p 5055:80 -it reverse-proxy-frontend:1.0.0
Push image to registry: Push image to registry:
--tag image --tag image
docker tag reverse-proxy-frontend:1.0.4 cloud.canister.io:5000/tstanciu/reverse-proxy:frontend-1.0.4 docker tag reverse-proxy-frontend:1.0.0 alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.0
--login to registry --login to registry
docker login --username=tstanciu --password="***REMOVED***" cloud.canister.io:5000 docker login --username=admin --password="***REMOVED***" alpine-nexus:8500
--push image --push image
docker push cloud.canister.io:5000/tstanciu/reverse-proxy:frontend-1.0.4 docker push alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.0
Pull image from registry Pull image from registry
--login to registry with readonly rights --login to registry
docker login --username=***REMOVED*** --password=***REMOVED*** cloud.canister.io:5000
--pull image --pull image
docker pull cloud.canister.io:5000/tstanciu/reverse-proxy:frontend-1.0.4 docker pull alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.0
Run container in prod env Run container in prod env
docker run --restart=always -p 5005:80 -d cloud.canister.io:5000/tstanciu/reverse-proxy:frontend-1.0.4 docker run -d --name reverse-proxy-frontend --restart=always -p 5005:80 alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.0
Rename container Rename container
docker rename <container_id> reverse-proxy-frontend docker rename <container_id> reverse-proxy-frontend