Lodestone-Team / lodestone_core

The backend for Lodestone, A free, open source server hosting tool for Minecraft and other multiplayers
https://www.lodestone.cc/
GNU Affero General Public License v3.0
60 stars 6 forks source link

Add Docker CI to existing ubuntu build workflow #115

Closed CheatCod closed 1 year ago

CheatCod commented 1 year ago

Description

This way we take advantage of the caching done by the existing workflow and avoid duplicate work.

Steps to reproduce (optional)

Bockiii commented 1 year ago

Hi,

I dont think that what you want is possible. If you establish using --cache-from as a buildx argument, your dockerfile will not be able to be used by anyone else to actually build the image. So no one could just clone your repo and run docker build (because it would be depended on injections from your buildx pipeline).

I would propose a different alternative: Implement an arm build into your build ci that also gets uploaded to release artifacts and rewrite your dockerfile to download a release by version tag that you can then use as an argument for the CI.

This would do the following:

This should bring the docker build down to seconds and you have the benefit of having a downloadable arm release available for users.