I’m having difficulty running a container, which is probably the result of not understanding ENTRYPOINT. Here’s what’s happening in really simple terms.
I have at the end of my Dockerfile:
/abc/entrypoint.sh looks like:
#!/bin/bash /etc/init.d/mysql start (cd /abc/solr; ./start_tomcat.sh) (cd /abc/foobar; ./start_tomcat.sh) /usr/sbin/apachectl start # tail -f /abc/foobar/logs/catalina.out
That ‘tail’ at the end of the script seems to be key. If it’s commented out, the container starts but exits immediately with the following:
docker run -d -P <image>
If ‘tail’ is NOT commented out then that run command works just fine. Looking at the process table of the container I can see ‘tail -f …’ running. If I kill it, the container exits.
Can someone explain this in pedestrian terms (ELI5). I’ve read the ‘Dockerfile Reference’ page but it’s not making sense to me.