Execute script from features during prebuild to cache the result? #40514
Replies: 2 comments
-
Hi there @amyXia1994 and welcome to our community! Thank you for asking a great question 🙂 To get started, introduce yourself in our official introduction thread |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the GitHub codespaces with dev container to provide an out-of-box quick start experience to my users. It really helps since my users do not need to install all the tools and dependencies. Now I want to speed up the quick start process further more using a prebuild and here's the problem I could not solve yet:
I'm providing quick start with features: docker-in-docker, kubectl-helm-minikube and kusion(and that's my product's feature). And now each user of my devContainer.json needs to run a
minikube start
script before they actually experience our product(a quick start tour of kusion). That's time-consuming and I want to speed up it by caching some resources in the prebuild process. For example:minikube start
, it will download thegcr.io/k8s-minikube/kicbase
image with docker.minikube start
will download a preloaded-tarball, for example:preloaded-images-k8s-v18-v1.25.3-docker-overlay2-amd64.tar.lz4
I want to pre-download these resources in the prebuild. I've tried
docker pull gcr.io/k8s-minikube/kicbase
withonCreateCommand
and it didn't work and produced errorOCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "docker pull gcr.io/k8s-minikube/kicbase:v0.0.36": stat docker pull gcr.io/k8s-minikube/kicbase:v0.0.36: no such file or directory: unknown
Could you help me with How are these images and tarballs supposed to be pulled during the prebuild?
Beta Was this translation helpful? Give feedback.
All reactions