-
Notifications
You must be signed in to change notification settings - Fork 260
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
Simplify and streamline the Dockerfile #509
Comments
Speed comparison (
Compared to...
* (The branch with the |
Size of built images:
Size of base images:
|
I have a branch where I updated the Dockerfile to be simpler, build a smaller image, and build faster. (This branch is still based on the Here's the link to the branch: https://github.com/RefugeRestrooms/refugerestrooms/blob/update-Dockerfile/Dockerfile The charts in the previous two comments are updated to show how it stacks up. This is the second-fastest build time I've recorded out of the various Dockerfile configurations, at 7 minutes and 48 seconds. (Behind only the Alpine Linux-based image for Ruby 2.5.3.) And it produces the third-smallest image in terms of disk space, at 827 MB. (Again, behind only the two Alpine Linux-based images.) It still uses a larger base image than Alpine, though, at 179 MB for I would say the slim (debian-based) image is fine, especially with the improved Dockerfile in That said, Debian is still more familiar than Alpine, and I would find it more reassuring to work with. So there is that trade-off. Edit: I re-ran the builds with a little more consistent approach. All the data are updated in the charts. |
Scope / difficulty
Just need to update the
Dockerfile
. Some discussion beforehand for consensus would be great.Impact
Would make
docker-compose build
run faster, and maybe make things easier to maintain; Should help the Docker config be more readable and easier to work with. Makes dependencies more obvious and more apparent what things are for what purpose.Rationale
I realized while working on a branch that makes Vagrant usable (again, I'm not sure why I can't let go of Vagrant 🤷) that we can simplify the Docker script. A lot of
apt-get update
andapt-get install
in the script can be removed, now that we have the nodejs, phantomjs, and yarn install scripts that install most or all of those packages regardless.I also noticed @btyy77c's branch over at https://github.com/btyy77c/refugerestrooms/tree/dockerAlpine, that shows how much neater the script can get. I think we might want to ask for some of those things as a Pull Request, or get the okay to re-implement some of those changes. (Would want to give credit in the commit messages.)
Proposal
I think we should try some simplified
Dockerfile
s and discuss which is the best direction to go.OR just make a pull request using some progress or improvements from the aforementioned branches:
And discuss there.
How to actually do this:
Dockerfile
. See branches that are linked above for ideas.Dockerfile
very often, so I don't think that's a big issue.Dockerfile
as a pull request.OR
The text was updated successfully, but these errors were encountered: