Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.

Why do we have to push an image to a registry?

  • When I build locally, I can run my apps.

    Why can't I install and run an app after it's built locally using the Cloudron Build Service app (don't worry, I don't use my Cloudron for anything production, just development)? Instead it has to push it to a registry which takes a lot of time, and then install it locally? I just don't understand the registry part and why that step needs to even be taken?

    I'm new to Docker, Cloudron, etc so I would like to know that. And if I can cut the "push" part out of my development flow it would save a lot of time, like I can do so locally.

  • Good question, this is why I advocated for a local registry App and an all inclusive build App that includes a registry and everything needed to build and install an app.

  • @robi I feel as if with "sane" settings (expire images after a few hours), this could be integrated into the already existing Cloudron Build Service app very little storage overhead. What do you think?

  • @Lonk exactly, it's temporary and changing often, no need to retain images since all changes are tracked in source.

  • Staff

    One needs to push the image only if your workflow involves building on one server and using the docker image in another cloudron/server. This is the workflow with @nebulon and i use. I guess we can adjust "cloudron build" to have a "cloudron build --no-push" or something? I am ok with this as long as it's explicit.

  • @girish said in Why do we have to push an image to a registry?:

    cloudron build --no-push

    That would be perfect and exactly what I was hoping for since I'm building the image in the Docker I'm updating / installing it on, I see no need for an extra push in there. I honestly love the cloudron build && cloudron update flow. And I'm looking forward to a cloudron update --no-push && cloudron update faster dev flow with the Cloudron Build Service being on the Cloudron instance itself.

  • Staff

    I am giving this a shot. Will update this post accordingly.

  • @girish said in Why do we have to push an image to a registry?:

    I am giving this a shot. Will update this post accordingly.

    I'm very grateful. I know helping developers on development servers can't be the top priority rn for you guys so anything like this is a godsend. Thank you!

    Though I wanted to mention, the Build Service hasn't caused a single issue in any of my other apps despite it messing with Docker directly. It's pretty stable. I think my storage has gone down a little, so maybe some garbage collection logic is needed, but it's a very stable app.

  • Staff

    @Lonk I gave this a shot:

    • First, update the CLI tool to 4.5.4
    • Then, update build service app as well to 1.4.1
    • Then, box code needs this patch.

    Then, you have cloudron build --no-push && cloudron update. I tested this flow a bit, there are some "quirks":

    • If you uninstall the app, the image will be removed.
    • The build service app periodically removes images. It only keeps the latest image around and will also remove the image after 48 hours. BUT, if the image is in use by some app, it will be fine.
    • Once all testing is done, once you are satisfied, you have to do a final "cloudron build" to actually pushes the images. This is only if you want to, of course.

    I have to try it but I this flow is kind of nice because we don't keep pushing temporary/intermediate/junk images to the registry. In fact, the current flow only makes sense because docker registry is free for public images 🙂

Log in to reply