3 ms·
> I also hate the Docker tagline that it "eliminates 'works on my machine' issues". Docker basically just takes a snapshot, which hides the problem rather than
by chriswarbo 4y ago
> I also hate the Docker tagline that it "eliminates 'works on my machine' issues".
Docker basically just takes a snapshot, which hides the problem rather than fixing it: when we want to change something, like updating a dependency, we're back to the same dependency hell.
Even worse, those snapshots are often not reproducible (e.g. running things like `apt-get install -y foo`, which depends on the latest contents of third-party servers). Again, Docker tries to hide the problem by putting snapshots into a cache.
To avoid these problems, we need the discipline to do sensible things (e.g. using specific .deb packages, rather than apt-getting whatever's latest; or using something more brute-force like Nix). Yet once we do that, there's usually no point doing it with Docker at all; since those commands work perfectly well outside of a container (if we want a container to deploy, we can tar up the resulting directory)
- sascha_sl 4y agoI'm not sure what you mean by "snapshot" when most docker images are instructions to (more or less) reproducibly create an image. I hope you don't COPY your entire system into the container at least.
- chriswarbo 4y ago> most docker images are instructions to (more or less) reproducibly create an image I can't recall ever encountering such a thing myself. On the other hand, I've seen LOTS of this sort of thing: RUN apt-get update && \ apt-get -y install apache2 The above is taken from official AWS documentation[1] but it's pretty rampant. As I mentioned above, when the instructions are reproducible, there's no point using Docker to run them; a shell script would suffice. [1] https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-container-image.html#create-container-image-create-image https://docs.aws.amazon.com/AmazonECS/latest/developerguide/...
- sascha_sl 4y agoIt depends a lot on your base image. If you use Debian locked to a release, you'll likely get the same Apache version plus small fixes / security fixes (whatever the exact Debian policy is). That's not reproducible in the sense of "reproducible software", but it is usually good enough to build other things on top of. If you want reproducible in the sense of unchaging/same digest, you should make a custom base image with the things you never want to change and pull it from somewhere.
- chriswarbo 4y ago"Base image", AKA a cached snapshot, like I said ;)