Zulip Chat Archive
Stream: lean4
Topic: Outdated docker image
Yaël Dillies (May 30 2024 at 15:55):
Annoyingly, the update to elan 3.1.0 is transitive on gitpod, so I get asked whether I want to update elan every time I open a workspace
Eric Wieser (May 30 2024 at 16:02):
I think that means a docker image needs rebuilding / invalidating
Yaël Dillies (May 30 2024 at 16:29):
I agree, but I don't know which one, where, nor how
Yaël Dillies (May 31 2024 at 21:32):
I've been poking around for an hour but I literally cannot even figure where the docker image is stored :frowning:
Eric Wieser (May 31 2024 at 22:01):
https://github.com/leanprover-community/mathlib4/blob/master/.docker/gitpod/Dockerfile
Eric Wieser (May 31 2024 at 22:03):
Based on https://stackoverflow.com/a/72971216/102441, the error is that we used RUN
and not ADD
there
Eric Wieser (May 31 2024 at 22:03):
The former caches the url, the latter caches the result pointed to by the url
Eric Wieser (May 31 2024 at 22:10):
Or alternatively, we should hard-code a version, to avoid rebuilding an image for every elan update
Eric Wieser (May 31 2024 at 22:11):
I guess the release cadence is low enough for it to not matter
Eric Wieser (May 31 2024 at 22:37):
The easiest option is to add some no-op command to the docker file before the elan installation, to cause a one-off cache invalidation
Yaël Dillies (Jun 01 2024 at 06:48):
Eric Wieser said:
https://github.com/leanprover-community/mathlib4/blob/master/.docker/gitpod/Dockerfile
That's not the image. That's the dockerfile.
Yaël Dillies (Jun 01 2024 at 06:49):
Sky answered my question: Apparently the image is hidden in some gitpod server and there's a way to ask for a regeneration, which I'm going to try now
Eric Wieser (Jun 01 2024 at 07:23):
I think we would do better to change the dockerfile to bust their (and anyone else's) cache
Yaël Dillies (Jun 01 2024 at 07:39):
Yaël Dillies said:
there's a way to ask for a regeneration, which I'm going to try now
It did regenerate the image but I ended up with elan 3.0.0
again :frowning: Are we pinning the version of elan somehow?
Yaël Dillies (Jun 01 2024 at 09:43):
I just found https://hub.docker.com/r/leanprovercommunity/mathlib... which hasn't been updated in a year and is Lean 3?
Yaël Dillies (Jun 01 2024 at 10:12):
Original problem fixed in #13439
Sky Wilshaw (Jun 01 2024 at 10:19):
I think it's inadvisable to update the Docker image, as then it'll need to be rebuilt after every elan update. Since elan self-updates really fast (<1s), I just added a step to gitpod.yml
to do the update on workspace initialisation.
Sky Wilshaw (Jun 01 2024 at 10:20):
(At least for gitpod's Dockerfile - if anyone's using the Dockerfile for other things maybe it's worth changing.)
Last updated: May 02 2025 at 03:31 UTC