mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-04-25 05:35:57 +03:00
[GH-ISSUE #39] Take advantage of multistage build #30
Labels
No labels
bug
confirmed next step
duplicate
enhancement
help wanted
in progress
in progress
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pgbackweb#30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jogai on GitHub (Sep 9, 2024).
Original GitHub issue: https://github.com/eduardolat/pgbackweb/issues/39
See https://blog.kubesimplify.com/multi-stage-docker-build#heading-the-lab-rat or https://github.com/alextanhongpin/go-docker-multi-stage-build?tab=readme-ov-file#method-3-using-multi-stage-build
The release image could be a lot smaller that way.
I'm not familiar with building go or the setup you used for your frontend app, so I got stuck at this point:
@eduardolat commented on GitHub (Sep 9, 2024):
Hello @Jogai, thanks for your suggestion
If you look at the Dockerfile we use in production (https://github.com/eduardolat/pgbackweb/blob/main/docker/Dockerfile) you will notice that it includes the minimum dependencies needed to run the software on both amd64 and arm64 hardware.
The fact that the golang binary depends on system tools such as pg_dump or psql, among others, makes it more complicated to simply copy the binary into a clean docker image.
If you could modify the aforementioned Dockerfile and make a proposal I would appreciate it, take into account the README.md next to the Dockerfile.
Always keep in mind that it is better to sacrifice a little space if what we gain is easier maintenance of the project.
@Jogai commented on GitHub (Sep 9, 2024):
Thank you for answering. Like I said, I'm not familiar with go, so I cant bring it further. Its just that I think this is something this project could benefit from. I'm a happy user, so I'll keep using it, but maybe it keeps someone with less bandwidth from trying.
Believe me, I know about tradeoffs, but I'm not advocating to make it less maintainable. If anything I think you can simplify it. But I also think you are wasting at least a GB, if not more, so we're not talking about 'a little space'.