Merge the base and bootstrap Dockerfiles
The only essential thing that bootstrap.Dockerfile
contains is the minifier binary that we use to minify the site's assets.
All the other stuff, like copying the Gemfile and then bundling the gems:
COPY /Gemfile* /source/
COPY /yarn.lock /source/
WORKDIR /source
# Install gems and node libraries
RUN NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install --jobs 4 && \
yarn install && \
yarn cache clean
are duplicate, as they later happen in builder.onbuild.Dockerfile
:
ONBUILD COPY . /source/
ONBUILD RUN NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install --jobs 4
ONBUILD RUN yarn install && yarn cache clean
ONBUILD RUN bundle exec rake setup_git default
ONBUILD RUN bundle exec nanoc compile -VV
We can thus:
- Move the minifier download to the base image
- Get rid of everything else and deprecate the bootstrap image
After this is merged, we need to update:
Edited by Achilleas Pipinellis