-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use apt update --snapshot
for reproducibility
#154
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
From https://snapshot.ubuntu.com/:
Should we be worried about snapshots getting deleted? |
It's 2 years, I hope we have to update something in two years. We could create a CI check to alert us that this is getting close to the end, IDK. |
But an application can (theoretically) live forever on-chain. |
Yes, it's doable to keep a mirror ourselves. |
after my fixup at b72863b, i executed the build CI one more time to check for reproducibility
Both matches:
|
Great! And you ran the second time without cache, right? |
Not sure about the cache 🤔 I'm running locally to see if I get the same result tho. |
I got a different template hash, and I've found two sources of non-determinism in the build of Lua and BusyBox. LuaThe file permissions of --rw-rw-r-- 0 0 0 1841 1970-01-01 00:00:00.000000 bounty.lua
+-rw-r--r-- 0 0 0 1841 1970-01-01 00:00:00.000000 bounty.lua Maybe this is solved by adding a BusyBoxIt embeds the build time in its version string, which naturally differs. -BusyBox v1.36.1.36.1 (2024-09-12 22:34:11 UTC)
+BusyBox v1.36.1.36.1 (2024-09-09 13:29:39 UTC) One fix is to define the My local build and the CI build also differed in this |
Let's leave these issues to a future PR, this looks good already. |
This PR will change the main Dockerfile to use the
apt update --snapshot
option to lock the Ubuntu repository into a specific point in time.See: https://snapshot.ubuntu.com
So, we don't need to pin package versions anymore and get the guarantee that the package versions used and their dependencies will always be the same.
When we want to change the date, we just need to change the
ARG NOBLE_DATE
to a desired values.I'm reusing this same
ARG
to theapt update --snapshot=
and for the Oficial Ubuntu Docker Image tag that has a date, likeubuntu:noble-20240801
.If we desire to change this date in the future, we can look what's the latest dated version available at https://hub.docker.com/_/ubuntu