CMD ["/sbin/init", "2"]
and start your app using init.d scripts or supervidord as usual?I feel like logrotate, cron, etc, are worth having inside container no?
CMD ["/sbin/init", "2"]
and start your app using init.d scripts or supervidord as usual?I feel like logrotate, cron, etc, are worth having inside container no?
Single process containers generally don't need all the baggage of a full init system or other dependencies - hence this project.
'npm install' needs 'make' half the time. Sometimes it's easier on debian-based setups to install build-essential than make, as it will pull in a few other things that help as well. GCC is one of those things - might it be that that container has build-essential installed?
I used to run docker with fat containers, and have now just finished getting rid of docker in favour of .debs. We were basically using it as a package manager, and it is terrible at the job. Docker has its use-cases, but package management isn't one of them. The docker tagging system is particularly bad at the job.
The problem is apt does a poor job of letting you setup something like build-essential and then remove it and leave just the runtime shared libraries you need for the other things you build to actually work.
The resulting images can be very small: https://hub.docker.com/r/jjclark/nethack/tags/
It's currently a little difficult because of a bug with building from a tarball: https://github.com/docker/docker/issues/15785
# install runtime deps
dpkg -l | awk '{print $2}' | sort > old.txt
# install build deps
# build software
dpkg -l | awk '{print $2}' | sort > new.txt
apt-get -y remove --purge $(comm -13 old.txt new.txt)
Probably a better way to accomplish that, but it was the easiest way I could see to implement an 'undo'It depends. If you are treating the container as a mini virtual system, then sure.
There is no need for logrotate if you are writing logs to stdout and letting the container system handle shipping then somewhere.
There's no need for cron in the container if you have a separate system for running scheduled tasks - somehing like Chronos.
I'd rather have a few tens of simple, single-process containers logging to a shared collector (or to their stdout, which is then collected) than deal with managing logrotate for them all and solve processing all those files for every host somehow.