Home > other >  Solving by dockerfile build samba mirror container service cannot be started, exited
Solving by dockerfile build samba mirror container service cannot be started, exited

Time:09-15

1, dockerfile content is as follows:
 

# the Source images'
The FROM centos: 6

# Author
MAINTAINER

# '
RUN curl -o/etc/yum repos. D/CentOS - Base. 'http://mirrors.aliyun.com/repo/Centos-6.repo & amp; & Yum makecache

# Install
The RUN yum -y install samba

# Port
EXPOSE 139

# Service
CMD ["/usr/sbin/SMBD ", "3-d"]


2, after building a successful image, run the mirror
 
Docker run - d - 139 p: 139 smbc6: latest
1576 bb2c1d2c9ffcbd2f814ddcc29b79ab94b27aeccbb119727e81b692868a39

3, check the container status is Exited, the service is not running
 
Docker ps - a | grep smbc6
1576 bb2c1d2c smbc6: the latest "/usr/sbin/SMBD - D" 23 seconds line Exited (0) 20 seconds line

CodePudding user response:

Has been solved, behind CMD parameter changed to - the FS
  • Related