Running multiple applications in one docker container

后端 未结 2 784
小鲜肉
小鲜肉 2020-12-08 10:26

This question is part of my continuing exploration of Docker and in some ways follows up on one of my earlier questions. I have now understood how one can get a full applic

2条回答
  •  猫巷女王i
    2020-12-08 10:50

    @Bryan's answer is solid, particularly in relation to the overheads of a container that just runs one process being low.

    That said, you should at least read the arguments at https://phusion.github.io/baseimage-docker/, which makes a case for having containers with multiple processes. Without them, docker is light on provision for:

    • process supervision
    • cron jobs
    • syslog

    baseimage-docker runs an init process which fires up a few processes besides the main one in the container.

    For some purposes this is a good idea, but also be aware that for instance having a cron daemon and a syslog daemon per container adds up a bit more overhead. I expect that as the docker ecosystem matures we'll see better solutions that don't require this.

提交回复
热议问题