-
Notifications
You must be signed in to change notification settings - Fork 9
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
Create builder_cache repo before first build #27
Comments
Todo : mark as good first issue |
Done. |
Hey @ashpect! Should I give this a try? |
Is this related to this: #38 ? |
no this is not related to #38. the idea here is simple , basically when you initiate the registry, it doesn't have any repo inside obviously, now this isn't a issue if you push a image to a repo not existing (a repo is created by default when you push and it doesn't exist), the issue comes if you pull, it will throw error obviously. Line 28 in f4b524d
Now take a look at test.sh, the startup tests don't need to pull anything as it's the startup when we push everything, but we still give some import registry cause we need to parse into Dockerfile. |
It's a standalone minor issue, nothing breaking so you can try it if you want and let me know if you have any further questions. @SaranshBaniyal |
@ashpect should I call the initialize function from within the setupRegistry() function or should I call it in startupTests(). Which one would make more sense? |
@SaranshBaniyal Since buildkit takes import reg in all arguments, it would be better to iniialize it when you create registry, inside setupRegistry |
I am getting this while testing with my solution, do you have any idea what might be causing this. setupRegistry(){
${DOCKER_CMD} up -d registry
while [ ! "$(docker inspect --format '{{json .State.Health.Status }}' metacall_builder_registry)" = "\"healthy\"" ]; do
sleep 5
done
# To Pre-initialize Import and Export Registry
initializeRegistry "registry:5000" "metacall/builder_startup"
initializeRegistry "registry:5000" "metacall/builder_cache"
}
initializeRegistry() {
local registry=$1
local repo_name=$2
docker pull busybox
docker tag busybox ${registry}/${repo_name}:dummy
docker push ${registry}/${repo_name}:dummy
} |
First does one really need to push something to a regsitry to make it ? Iing makes one by default, but try to find a command that creates one without pushing anything (the reason is we'll be pulling everything in builder cache) - it works by pushing for now as well, you can do that later. while [ ! "$(docker inspect --format '{{json .State.Health.Status }}' metacall_builder_registry)" = ""healthy"" ]; do here we enable docker to inspect the health of the registry try all this and lemme know if it works lemme know if you have any doubts @SaranshBaniyal |
The code works throwing warning if we do not create one, as pushing cache after the first build automatically creates one, but would be safer to build before using a small script.
The text was updated successfully, but these errors were encountered: