Run a service automatically in a docker container

To keep docker containers running, you need to keep a process active in the foreground.

So you could probably replace that last line in your Dockerfile with

CMD /bin/riak console

Or even

CMD /bin/riak start && tail -F /var/log/riak/erlang.log.1

Note that you can’t have multiple lines of CMD statements, only the last one gets run.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)