I have DockerFile
FROM php:5.6-apache SHELL ["/bin/bash", "-c"] ... COPY start.sh /root/init.sh RUN chmod 700 /root/init.sh RUN /root/init.sh # WORKING IF CMD IS ABSENT !!! COPY start.sh /root/start.sh RUN chmod 700 /root/start.sh CMD /root/start.sh # <-- NOT WORKING (((
The image is building well.
The container is not starting if I have CMD instruction, without any logs! If I skip the CMD instruction, container is working well, BUT I need to run start.sh every time when the container run. How can I resolve this issue?
#!/bin/bash touch /root/$RANDOM-init.txt
#!/bin/bash touch /root/$RANDOM-start.txt