apache - "no such file or directory" when running Docker image -
i'm new docker , trying create image owncloud 7 on centos 6. i've created dockerfile. i've built image. goes right except when run image :
docker run -i -t -d -p 80:80 vfoury/owncloud7:v3
i error :
cannot start container a7efd9be6a225c19089a0f5a5c92f53c4dd1887e8cf26277d3289936e0133c69: exec: "/etc/init.d/mysqld start && /etc/init.d/httpd start": stat /etc/init.d/mysqld start && /etc/init.d/httpd start: no such file or directory
if run image /bin/bash
docker run -i -t -p 80:80 vfoury/owncloud7:v3 /bin/bash
then can run command
/etc/init.d/mysqld start && /etc/init.d/httpd start
and works.
here dockerfile content :
# utilize centos6 base of operations image centos:centos6 maintainer vincent foury run yum -y update # install ssh server run yum install -y openssh-server run mkdir -p /var/run/sshd # add together epel repository run yum install epel-release -y # install owncloud 7 run yum install owncloud -y # expose les ports 22 et 80 pour les rendre accessible depuis l'hote expose 22 80 # modif owncloud conf allow client access re-create owncloud.conf /etc/httpd/conf.d/owncloud.conf # start httpd , mysql cmd ["/etc/init.d/mysqld start && /etc/init.d/httpd start"]
any help appreciated
vincent f.
i think because you're trying utilize &&
within dockerfile cmd
instruction.
if intend run multiple services within docker container, may want check supervisor. enables run multiple daemons within container. check docker documentation @ https://docs.docker.com/articles/using_supervisord/.
alternatively add
simple bash script start 2 daemons , set cmd
utilize bash file added.
apache build docker
No comments:
Post a Comment