2019-06-11 17:22:37
focus.shi
|
1、基础镜像使用的是centos:6 2、dockerfile 如下:------------------------------------------------------------------------------------------------------------------------------------------------------------------#Source images FROM centos:6 #Author MAINTAINER foucs.shi@outlook.com#Repo RUN curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo && yum makecache #Install RUN yum -y install samba #Port EXPOSE 139 #Service CMD ["/usr/sbin/smbd","-D"]---------------------------------------------------------------------------------------------------------------------------------------------------------------------3、运行镜像docker run -d -p 139:139 smbc6:latest 1576bb2c1d2c9ffcbd2f814ddcc29b79ab94b27aeccbb119727e81b692868a394、docker ps -a查看容器状态为 STATUS Exiteddocker ps -a | grep smbc61576bb2c1d2c smbc6:latest "/usr/sbin/smbd -D" 23 seconds ago Exited (0) 20 seconds ago
|