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

[DRAFT][Dockerfile]Use Docker Multistage Builds #44

Open
yelghali opened this issue Apr 6, 2023 · 0 comments
Open

[DRAFT][Dockerfile]Use Docker Multistage Builds #44

yelghali opened this issue Apr 6, 2023 · 0 comments

Comments

@yelghali
Copy link

yelghali commented Apr 6, 2023

In multistage build, we use intermediate images (build stages) to compile code, install dependencies, and package files in this approach. The idea behind this is to eliminate unwanted layers in the image.

After that, only the necessary app files required to run the application are copied over to another image with only the required libraries, i.e., lighter to run the application.

to learn more: https://docs.docker.com/build/building/multi-stage/

To help you make your container smallers and more optimized, you can use tools like: https://github.com/slimtoolkit/slim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants