this post was submitted on 24 Nov 2023
927 points (98.0% liked)

Programmer Humor

19594 readers
820 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 81 points 1 year ago (11 children)

Literally why docker was invented

[–] [email protected] 20 points 1 year ago* (last edited 1 year ago) (2 children)

Yeah, it "solved" the "it works on my machine" by bundling the machine with the code.

https://youtu.be/0uixRE8xlbY

[–] [email protected] 7 points 1 year ago (1 children)

Man, I really was interested in that topic, but that guy really can't do talks.

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago)

What about this? https://youtu.be/5XY3K8DH55M

Also I created this repo to create a reproducible sec environment for myself. I added other languages, but personally work mostly with python. It is basically resonating for handling all the boiler plate:

https://github.com/takeda/nix-cde

For packaging in docker I started to use nix2container project as it gives me a greater control over layers. So for example when I package my phyton app I typically use 3 layers:

  • python and it's dependencies
  • my application dependencies
  • my application, which is very tiny compared to other two, so there is great reuse of the layers

The algorithm mentioned in the video also helps a lot with reuse, but the above is more optimized by frequency of how things typically change.

BTW: today I discovered this https://github.com/astro/microvm.nix I haven't play with it yet, but in theory it would let me generate a microvm image (in similar fashion to generate a docker container) which would let me to run my app natively as a tiny VM on EC2 for example, and use only minimum necessary of a typical OS to run it.

load more comments (8 replies)