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) #2051

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 PG12 PostgreSQL12 label Aug 17, 2024
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-pg12 branch from 73ef88a to d9a77e9 Compare August 17, 2024 09:38
@MuhammadTahaNaveed MuhammadTahaNaveed merged commit 2e027cf into apache:PG12 Aug 21, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PG12 PostgreSQL12
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants