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

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 PG11 PostgreSQL11 label Aug 17, 2024
@shinyaaa shinyaaa force-pushed the refactor-dockerfile-to-use-multi-stage-builds-pg11 branch from b218e36 to 1a87d60 Compare August 17, 2024 09:39
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-pg11 branch from 1a87d60 to d060c88 Compare August 17, 2024 09:40
@MuhammadTahaNaveed MuhammadTahaNaveed merged commit 1e59017 into apache:PG11 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
PG11 PostgreSQL11
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants