Skip to content

appop/docker-service

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-service

build

docker build -t zouchao2010/docker-service .

run(创建并运行一个容器,退出时删除容器)

docker run  --name docker-service \
            -h docker-service \
            -v /data/docker-service_data:/var/lib/docker-service \
            -it --rm zouchao2010/docker-service
            

run(创建并运行一个容器,以守护进程方式)

docker run  --name docker-service \
            -h docker-service \
            -v /data/docker-service_data:/var/lib/docker-service \
            -dt zouchao2010/docker-service
            

start|stop|restart(已存在的容器)

docker start|stop|restart docker-service

exec(使用已运行的容器执行命令)

docker exec -it docker-service /bin/bash

结果

docker stop|restart 发送的信号都是15

[I 150805 01:58:52 service:25] Service Exit! signal:15

Ctrl+C 发送的信号是2

[I 150805 02:04:52 service:25] Service Exit! signal:2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%