3 ms·
Absolutely. Think of a Docker container as a universal build artifact. Your build step can be an arbitrary sequence of unix commands (download dependencies, bui
by shykes 14y ago
Absolutely. Think of a Docker container as a universal build artifact. Your build step can be an arbitrary sequence of unix commands (download dependencies, build libssl, run shell scripts etc.). Docker can freeze the result of that build and guarantee that it will run in a repeatable and self-contained way, no matter where you run it.
So you get clean separation of build and run, which is a hugely important part of reliable deployment.
- wereHamster 14y agoSo docker container ABI is basically the kernel? You just create a filesystem image and docker starts that as LXC guest. You could build a statically compiled binary and put that as /bin/init into the container image, right?
- shykes 14y agoYes! Exactly :) You wouldn't need to save it as /sbin/init. You would just type: $ docker run MYIMAGE /path/to/my/static/binary Here's the smallest image I've personally used to run a docker container: http://get.docker.io/images/busybox http://get.docker.io/images/busybox