-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: support build docker image #306
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool. Thank you.
The initial idea of immich-go was to not bother tandom users with npm, docker, etc... :-)
But apparently there is an use case for docker...
Do you know how to publish the package with github actions?
Will try to add a workflow file later, ref: https://github.com/pkking/copr_docker/blob/main/.github/workflows/keygen-signd-publish.yml#L48-L110 |
2dccfb3
to
26e3f9a
Compare
@simulot This pr contains a new workflow that can publish a docker image to docker hub && ghcr registry, you just need to add two github action secret Here's the newest image i pushed from the forked repo action |
I have more questions about this? Can we have discussion on Discord or by email? |
@simulot Sure thing, discord id: lcr1221 and TZ: GMT+8, if not available, can email me using the address from the PR commit :) |
Why would someone need Docker image for this?. 🤔 Also, why would you use anything other than |
@simulot you can also use ghcr.io (GitHub's registry) instead of Dockerhub. - name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} |
@erkexzcx Is it possible to leverage github actions to generate binaries for all platforms? triggered by tagging the main branch? |
@pkking what is the benefit of Docker to begin with? Here is why I believe Docker images are not needed:
|
Hi @erkexzcx, my use case is i want to run immich-go in cronjob, each time the job scheduled, will need to upgrade immich and immich-go both firstly and i didnt find a |
https://github.com/simulot/immich-go/pull/306/files#diff-551d1fcf87f78cc3bc18a7b332a4dc5d8773a512062df881c5aba28a6f5c48d7R47-R53 this PR will push the image to both dockerhub and ghcr |
That's legit. But this will put the maintenance and the support for this release on me. I don't master the docker environnement enough for providing a good support. What if you release the docker image on your own, synchronized with immich-go release? I'll add a section in the readme file that points to your repo? |
Instead of using Docker....
you can totally use binary just in a same way...
@simulot not that it would bring more maintenance, but there is barely any benefit of providing Docker image for a tool like this. Imagine this would have been nodejs project - totally makes sense to provide Docker image as user wouldn't need to install nodejs and with Docker you can ensure that user uses the right nodejs version, the right configuration, you provide isolated and consistent environment etc. With Golang, it's just a single binary, no external deps and personally I don't see any reason to provide Docker image. Certain services, including the ones that I (barelly) maintain, they are running as services/daemons and even tho they can be used as regular binaries, I also provide Docker images because it's way more convenient to have all your services at your home server to be running under a single "roof" which is Docker service. But again - those are services/daemons that run 24/7, while this tool is supposed to be ran once and that's it. |
@erkexzcx your point is valid. I have started immich-go exactly because I wouldn't install node.js and all other dependencies on my laptop. A golang program is a perfect fit for that need. Some users are using immich-go not for the google photos import but for synchronise regularly immich with another source of photos. They run immich-go as a cron task. Certainly a niche usage. Immich-go is open source, and every one can contribute. So why not. @pkking can maintain the image on is own. |
@erkexzcx Thats right, so thats an XY problem, the actual reason i want to use docker is because i want to upgrade immich-go to latest version before each cronjob started, for immich-go in docker, just
then
Without a docker image, i can't find a way to do this, if anyone provided a And yes, @simulot i'd like maintain the docker and github actions stuff is this PR get merged |
Don't take me for serious here, but it is more than doable... 😅
|
Got it |
@simulot and @pkking It's also easier than downloading/installing the binaries. Docker is not only for 24/7 services. It's also great for simple commands ligne immich-go. Immich CLI has a docker image. (yes with npm it make even more sense to have one...) Please reconsider the possibility to merge this PR. |
There are some usages I didn't see, there is maintainer. So let's do it Thanks for help |
Signed-off-by: waaagh <[email protected]>
Signed-off-by: lcr <[email protected]>
@simulot please enable the CI, also please add a action secret NOTE: i add a new CI to prevent the docker image build failed, each time the golang compiler changed, the ci will complain and people should know |
This PR want to support building docker image for this awesome project, maybe more steps can be done like publish package with github action :)
PS: will be happy to make more contributions!