Docker Community Forums

Share and learn in the Docker community.

Can't run docker container: no such file or directory

build
docker

(Akkonrad) #1

I’m trying to create container that will have apache and some other stuff there. All I get is one error when including last command to execute file that contains code that never finish.
Here is error code:
Error response from daemon: Cannot start container [container id]: [8] System error: no such file or directory

Here is dockerfile:

FROM ubuntu:12.04

RUN apt-get update
RUN apt-get install -y php5 libapache2-mod-php5 php5-mcrypt php5-gd

RUN rm -rf /var/www/html
COPY . /var/www/html

WORKDIR /var/www/html

EXPOSE 80

RUN ls /var/www/html
RUN cat /var/www/html/startServer.sh

RUN chmod +x /var/www/html/startServer.sh

#none of those works
CMD ["/var/www/html/startServer.sh"]
#CMD ["./var/www/html/startServer.sh"]
#CMD ["/bin/bash", "/var/www/html/startServer.sh"]
#CMD ["/bin/bash", "./var/www/html/startServer.sh"]

here is startServer.sh file:

while true; do sleep 1000; done