docker常见命令

原创
2019/09/10 09:17
阅读数 97

docker ps -a

docker rm -f 0c7e75eba725


docker rmi 镜像id


docker build -t allcam_media:v1.0.0 .


docker build -t allcam_media:v1.0.0 .
 
 
 
docker exec -it 0e5722b37760 /bin/bash


docker commit allcam_base allcam_mid
rm -rf opt/ACS_Common opt/ACS_Autoinstall opt/service_install opt/JDK opt/acs.sh
docker build -t allcam_media:v1.0.0 .

docker rmi allcam_mid 
docker stop allcam_base
docker rm allcam_base



docker run -itd allcam_media:v1.0.0 /bin/bash

docker run -itd -v /etc/profile:/etc/profile allcam_media:v1.0.0 /bin/bash

docker run -it -v /etc/profile:/etc/profile allcam_media:v1.0.0 /bin/bash

docker run -it -v /etc/profile:/etc/profile -v /opt/yizhichao/docker/opt/jdk1.8.0_152:/opt/JDK allcam_media:v1.0.0 /bin/bash

docker run -it -v /etc/profile:/etc/profile -v /opt/yizhichao/docker/opt/jdk1.8.0_152:/opt/JDK -p 10000:10000 -p 10005:10005 -p 10002:10002 -p 18443:18443 -p 18080:18080 allcam_media:v1.0.0 /bin/bash


docker run -it -v /etc/profile:/etc/profile -v /opt/yizhichao/docker/opt/jdk1.8.0_152:/opt/JDK -v /opt/yizhichao/docker/opt/acs_wh/:/opt/acs_wh/ -p 10000:10000 -p 10005:10005 -p 10002:10002 -p 18443:18443 -p 18080:18080 allcam_media:v1.0.0 /bin/bash



docker run -it -v /etc/profile:/etc/profile -p 10000:10000 -p 10005:10005 -p 10002:10002 -p 18443:18443 -p 18080:18080 allcam_media:v1.0.0 /bin/bash


启动容器:
docker run -it -p 10000:10000 -p 10005:10005 -p 10002:10002 -p 18443:18443 -p 18080:18080 allcam_media:v1.0.0 /bin/bash

docker run -itd -p 10000:10000 -p 10005:10005 -p 10002:10002 -p 18443:18443 -p 18080:18080 -p 10010:10010 allcam_media:v1.0.0 /bin/bash


docker run -itd -p 10000:10000 -p 10005:10005 -p 10002:10002 -p 18443:18443 -p 18080:18080 -p 10010:10010 allcam_mas:v1.0.0 /bin/bash

docker run -itd -p 10010:10010 mas_allmedia:last /bin/bash

docker run -itd -p 10010:10010 e357eab9f539 /bin/bash     

docker logs -f --tail=50 f38a5552c23e


unzip:  cannot find or open acs-script.zip, acs-script.zip.zip or acs-script.zip.ZIP.


docker-compose up -d 

curl http://172.16.20.36:10005/monitor/node/list/get            

curl http://172.16.20.36:10005/properties/acs-env.properties

curl http://inner-bdgw.allcam.org:10005/monitor/node/list/get  
curl http://inner-bdgw.allcam.org:10005/properties/acs-env.properties


172.16.20.32 inner-bdgw.allcam.org


su - oms 
mkdir logs 
exit  
su - access
mkdir logs
exit
su - mss
mkdir logs
exit
su - css
mkdir logs
exit
su - smp
mkdir logs
exit
su - svs
mkdir logs
exit


su - acgw
cd sbin/
./stop_nginx.sh 
./start_nginx.sh &
exit

su - bdgw
cd sbin/
./stop_bdgw.sh 
./start_bdgw.sh &
exit


su - oms 
stop
start
exit  
su - access
stop
start
exit
su - mss
stop
start
exit
su - css
stop
start
exit
su - smp
stop
start
exit
su - svs
stop
start
exit


dubbo.registry.address=zookeeper://172.17.0.1:2181

spring.datasource.url=jdbc:mysql://172.17.0.1:3306/acsdb?dontTrackOpenResources\=true&useUnicode\=true&characterEncoding\=utf8
spring.datasource.username=root
spring.datasource.password=root123456

spring.activemq.broker-url=tcp://172.16.0.1:9092
spring.activemq.user=admin
spring.activemq.password=Allcam@2017

spring.redis.host=172.17.0.1
spring.redis.port=10170
spring.redis.password=bitmain



logging.config=classpath:config/logback-console.xml



logging.config=classpath:config/logback-console.xml


acs propset oms logging.config "classpath:config/logback-file.xml"       
acs propset access logging.config "classpath:config/logback-file.xml"       
acs propset mss logging.config "classpath:config/logback-file.xml"       
acs propset css logging.config "classpath:config/logback-file.xml"       
acs propset smp logging.config "classpath:config/logback-file.xml"       
acs propset svs logging.config "classpath:config/logback-file.xml"  

容器导出:
docker export 54545484 -> docker_allcam_media.tar

容器导入:
cat docker_allcam_media.tar | docker import - allcam_media:v1.0.0

镜像导出:
docker save 6fb3c3622474 > docker_allcam_media.tar allcam_media:v1.0.0

镜像导入:
docker load < docker_allcam_media.tar
docker load -i docker_allcam_media.tar


docker tag 95b6a25fa32c suse11sp4:latest 


docker tag 139b53559aa6 mas_allmedia:latest 


root@allcam:/opt/yizhichao# docker load -i docker_allcam_media.tar
bef5b9104ca4: Loading layer [==================================================>]  111.6MB/111.6MB
a0ab140c2f77: Loading layer [==================================================>]  1.147GB/1.147GB
82e9abeeb6cd: Loading layer [==================================================>]  2.048kB/2.048kB
Loaded image: allcam_media:v1.0.0
root@allcam:/opt/yizhichao# 



Line 7:  [     access    id: 15    ip:      172.17.0.2    status: OOS    group:            version: build-20190704165216 ]
Line 15: [        css    id: 16    ip:      172.17.0.2    status: OOS    group:            version: build-20190520093308 ]
Line 28: [        mss    id: 17    ip:      172.17.0.2    status: OOS    group:            version: build-20190718101108 ]
Line 37: [        oms    id: 13    ip:      172.17.0.2    status: OOS    group:            version: build-20190422165854 ]
Line 62: [        smp    id: 71    ip:      172.17.0.2    status: OOS    group:            version: build-20190515014016 ]
Line 63: [        svs    id: 14    ip:      172.17.0.2    status: OOS    group:  svs_01    version: build-20190528113936 ]
	
	
	
	
	
	
	
	

 

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部