Closed darpr closed 6 years ago
This looks cool, thanks for the pull request!
I am in favor of merging, and we may have another maintainer get a chance to look at this over the weekend. Will wait until then so other maintainers can discuss and give their thoughts.
In any case, happy Hacktoberfest! :jack_o_lantern: :computer: :fallen_leaf: :sparkles:
Thanks for the feedback, @DeeDeeG! Appreciate the work that you guys are doing through this project.
This looks fine to me. @mi-wood do you want to weigh in as the only person with more Ops experience?
Just a comment: We can look into how many of these apt commands (including from before this pull request) we really need. I have a branch where I removed almost every apt-get update
and apt-get install
from the dockerfile
and it went fine.
The reason our setup can be so simple with regard to apt packages is that the (recently added) nodejs and yarn installation scripts download a whole lot of apt packages (like build-essential
) that are generally useful later in the Dockerfile
.
But the overall concept of using a slimmer base image sounds good IMO.
I think the criterion for merging this should be "does the app work" vs. errors during docker-compose build
or docker-compose up
or when testing the app.
I think we could copy some of the approach taken here: https://github.com/RefugeRestrooms/refugerestrooms/compare/develop...btyy77c:dockerAlpine
Noteworthy techniques in this branch:
yarn
and presumably nodejs
from the linux distro's package repositoriesapt-get install nodejs
&& npm install yarn
yarn
phantomjs-prebuilt
to the Package.json
See also this branch I made: https://github.com/RefugeRestrooms/refugerestrooms/compare/develop...DeeDeeG:cleanup-Dockerfile
Noteworthy techniques in this branch:
nodejs
and yarn
install scripts to install most packages from the linux distro's repository
apt-get update
and apt-get install
commandsIn terms of simply merging this PR, I would say we can remove the rm /var/lib/apt/lists/*
command, or move it to after any apt-get
commands. But everything else is pretty much good within the scope of this pull request.
For a fuller discussion of optimizing the Dockerfile, I opened #509.
Thanks @DeeDeeG !
Context
Summary of Changes
Checklist
Tests passed:
Screenshots
Could launch application after the changes:
Before
With the previous base-image, host machine had a 941 MB Ruby base image.
After
With these changes, the Ruby base image footprint on host is just 254 MB.