Closed kanolato closed 4 years ago
Ok. So these changes create this flow:
alpine:edge
base to a Debian Node base image.ONBUILD
instructionsalpine:edge
base imageWhy was the port changed from 80
to 8080
? Your related commit says due to "practicity" What does that mean?
This change while nice, will prevent existing users of the current workflow from being able to avoid the build within the container and debugging anything that may go wrong. Perhaps this contribution should rather compliment the existing offering?
This doesn't solve #25, as that's about a development image. One that doesn't require building an image locally for every change.
Also i first tried to use the image as the documentation but the :onbuild tag lacks of nginx rules and every request gets a 500.
What has your PR done to resolve that? Both end up serving nginx from the same main gatsby alpine image?
@kanolato I am in agreement with @polarathene's comments - are you able to update this PR and maybe it could get merged?
Going to update it in the following days :) @JaKXz
Than you all for your comments!. The required changes were just pushed.
25
My bad, You are completely right on the last part, this doesn't solve #25, as in the end it only provides a way to serve the built assets. I will explore it later next week. Im almost sure its possible mounting volumes and so. Again thank you for your replies
IIRC, stretch image dependencies were out of date, especially cwebp. Since Buster has been out for a while, perhaps better to switch to that.
I have changed to buster and upgrade node to 12
Holy buckets, @kanolato — we just merged your PR to Gatsby! 💪💜
Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.
Thanks again!
When im using Docker i like that i dont have to install anything else but Docker. I thought that it would be nice to build the project in
gatsbyjs/gatsby:onbuild
and then just copy the public dir togatsbyjs/gatsby
. Now as the documentation says the:onbuild
tag builds the project and:latest
serves it. Also i first tried to use the image as the documentation but the:onbuild
tag lacks of nginx rules and every request gets a500
.25