5 ms·
I'm interested to see how that standardization works across linux distributions. I mean, different distros use different versions of various libraries (openssl
by wereHamster 14y ago
I'm interested to see how that standardization works across linux distributions. I mean, different distros use different versions of various libraries (openssl for example). So if your app links with libssl.so.X but the host only provides libssl.so.Y, then your app won't work.
Of course, you could bundle libssl with your app. But then the standardization is at the level of kernel/libc ABI. In which case the container is basically a full LXC guest.
But then why standardize an image format if you can create a small script which builds the image with lxc-create + installs whatever else necessary for your app. That script will be much smaller than the full image, even a barebones ubuntu lxc guest (debootstrap quantal) is ~400MB.
- wmf 14y agoTheir base layer needs to specify exact versions of libraries. Deploying from images should be much faster and less fragile (oops, is Github down?) than from scripts.
- shykes 14y agoAbsolutely. 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