Reputation: 3136
I need to use supervisord in a docker container.
I want to keep the size of the container as small as possible.
Supervisord can be installed either using apt-get or python-pip.
Which method is recommended? and what should be thinking process while making these kind of decisions?
P.S Need supervisor because of legacy code. Can't do without it. Supervisord version is not important.
Upvotes: 0
Views: 3553
Reputation: 10064
Mostly depends on the version you want to install (if that relevant to you). apt-get's version are usually behind pip's version.
Also apt's version is tested and compatible with any other system dependency. Installing with pip could cause some conflicts with other already installed dependencies (most likely of your base OS is old)
If your goal is to keep image size small, make sure you install supervisor without leaving any cache (I.e: delete apt indices and /var/cache
directory) or unwanted files (I.e: remove unneeded packages, use apt's install --no-install-recommends
, use pip's install --no-cache)
in a single Dockerfile RUN statement.
Upvotes: 1