-
Notifications
You must be signed in to change notification settings - Fork 311
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
Speed up Docker build #17
Comments
We do it this way because the build dependencies aren't required for
running ghost, so separating them out just makes the image larger for no
reason (since most people are pulling this image, not building it).
|
@tianon thanks! Something new for me :) I would need to go learn more about Docker but that's a useful tool that i'm using more frequently ! |
@tianon since we are on this topic (not the best place to ask), how does more commands lead to a larger image? Anywhere i can read more about this? |
https://docs.docker.com/docker/introduction/understanding-docker/#how-does-a-docker-image-work talks about it a bit -- basically, each command creates a new layer, and each of these layers is isolated from the previous layers (and thus removing something in a later layer cannot affect the size of the previous layer, since the image layers themselves are stacked and immutable). |
Would it be faster if we split the installation of Build deps into a
RUN
and another for thecurl
of lates Ghost version?https://github.com/docker-library/ghost/blob/master/Dockerfile#L33
The current setup is ok but builds a little slowly for mine on an armhf device. Just though it might be worth discussing/bringing this up as an improvement!
The text was updated successfully, but these errors were encountered: