Skip to content
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

Refactor Dockerfile to use multi-stage builds (#2004) #2054

Conversation

shinyaaa
Copy link
Contributor

Refactored Dockerfile to use multi-stage builds for reduction image size.

The installation of the packages required for the build and the build process are carried out at the build stage. The built binaries are then placed in the final image.

This changes has reduces the image size about 1/3.

$ docker image ls apache/age
REPOSITORY   TAG       IMAGE ID       CREATED          SIZE
apache/age   tmp       5ffd0b539a88   22 minutes ago   458MB <-- New image
apache/age   latest    fb44b5789198   2 months ago     1.5GB <-- Original image

@github-actions github-actions bot added the PG15 PostgreSQL15 label Aug 17, 2024
@shinyaaa shinyaaa force-pushed the refactor-dockerfile-to-use-multi-stage-builds-pg15 branch 2 times, most recently from f80f55f to 617f2ad Compare August 17, 2024 09:31
Refactored Dockerfile to use multi-stage builds for reduction image size.

The installation of the packages required for the build and the build process are carried out at the build stage. The built binaries are then placed in the final image.

This changes has reduces the image size about 1/3.
```
$ docker image ls apache/age
REPOSITORY   TAG       IMAGE ID       CREATED          SIZE
apache/age   tmp       5ffd0b539a88   22 minutes ago   458MB <-- New image
apache/age   latest    fb44b5789198   2 months ago     1.5GB <-- Original image
```
@shinyaaa shinyaaa force-pushed the refactor-dockerfile-to-use-multi-stage-builds-pg15 branch from 617f2ad to 926e2f8 Compare August 17, 2024 09:34
@MuhammadTahaNaveed MuhammadTahaNaveed merged commit d7d34a2 into apache:PG15 Aug 20, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PG15 PostgreSQL15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants