2021-08-01 01:55:21 +03:00
|
|
|
#######################################################################################################################################################
|
|
|
|
Docker commands:
|
|
|
|
*****************
|
|
|
|
|
|
|
|
Create image:
|
|
|
|
--from solution folder:
|
|
|
|
docker image build -t "cdn-admin-frontend:1.0.0" .
|
|
|
|
|
|
|
|
Run image:
|
|
|
|
docker run -p 5053:80 -it cdn-admin-frontend:1.0.0
|
|
|
|
|
|
|
|
Push image to registry:
|
|
|
|
--tag image
|
|
|
|
docker tag cdn-admin-frontend:1.0.0 alpine-nexus:8500/cdn/cdn-admin-frontend:1.0.0
|
|
|
|
|
|
|
|
--login to registry
|
|
|
|
docker login --username=admin --password="***REMOVED***" alpine-nexus:8500
|
|
|
|
|
|
|
|
--push image
|
|
|
|
docker push alpine-nexus:8500/cdn/cdn-admin-frontend:1.0.0
|
|
|
|
|
|
|
|
Pull image from registry
|
|
|
|
--login to registry
|
|
|
|
|
|
|
|
--pull image
|
|
|
|
docker pull alpine-nexus:8500/cdn/cdn-admin-frontend:1.0.0
|
|
|
|
|
2021-08-01 03:04:48 +03:00
|
|
|
Stop old container
|
|
|
|
docker stop cdn-admin-frontend && docker rm cdn-admin-frontend
|
|
|
|
|
2021-08-01 01:55:21 +03:00
|
|
|
Run container in prod env
|
|
|
|
docker run -d --name cdn-admin-frontend --restart=always -p 5010:80 alpine-nexus:8500/cdn/cdn-admin-frontend:1.0.0
|
|
|
|
|
2021-08-01 03:04:48 +03:00
|
|
|
Remove old image
|
|
|
|
docker rmi alpine-nexus:8500/cdn/cdn-admin-frontend:1.0.0
|
|
|
|
|
|
|
|
Get container logs
|
|
|
|
docker logs cdn-admin-frontend
|
2021-08-01 01:55:21 +03:00
|
|
|
#######################################################################################################################################################
|
|
|
|
|
|
|
|
Docker container last version: 1.0.0
|
|
|
|
#######################################################################################################################################################
|