Ok just learning about creating a Dockerfile and my understanding (which is probably wrong) is that the CMD command should be able to run a shell script from within the container once it is placed there.
I am just trying it out with a vanilla apache2 install
Dockerfile
FROM ubuntu:latest
ADD install-apache.sh /Scripts/install-apache.sh
RUN chmod +x /Scripts/install-apache.sh
CMD [/Scripts/install-apache.sh]
RUN echo "Hope this worked!"
I have also tried this:
CMD ["/Scripts/install-apache.sh"]
When I use the RUN command it works (without the [ and ])
So I am a bit lost what the CMD is suppose to do.
I followed the instructions from http://kimh.github.io and read through the docker docs as well.
Question:
How am I using the CMD wrong and how should I use it in this scenario?