logoalt Hacker News

DuncanCoffeetoday at 8:26 AM6 repliesview on HN

I know it's an anti-pattern, but what is the alternative if you need to install some software? Pulling its tagged source code, gcc and compile everything?


Replies

Filligreetoday at 11:34 AM

Run “nix flake update”. Commit the lockfile. Build a docker image from that; the software you need is almost certainly there, and there’s a handy docker helper.

show 2 replies
bennofstoday at 10:04 AM

Both Debian and Ubuntu provide snapshot mirrors where you can specify a date to get the package lists as they looked at that time.

show 1 reply
kandrostoday at 10:36 AM

Copying from another image is an under appreciated feature

FROM ubuntu:24.04

COPY --from=ghcr.io/owner/image:latest /usr/local/bin/somebinary /usr/local/bin/somebinary

CMD ["somebinary"]

Not as simple when you need shared dependencies

liveoneggstoday at 11:21 AM

pretend you don't do it and add your extra software to the layer above

dev_l1x_betoday at 11:31 AM

base image

software component image

both should be version pinned for auditing

rowanG077today at 8:38 AM

With a binary cache that is not so bad, see for example what nix does.

show 1 reply