Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a base docker image for layer caching purposes
This will drastically improve docker dev environment initial setup speed. Rather than building locally, the local docker build (built from Dockerfile.dev) is now based on the public, automated exercism/exercism.io build (built from Dockerfile). With this as a starting point, a developer's `docker-compose build` need only install any new gems that are introduced in the feature branch. With no local changes, a local docker build, excluding download time, now takes approximately 6 seconds, vs. 50 minutes before. Changes: - .dockerignore vendor/ Vendored gems make the docker context directory size large (+1.1 G in vendor/), causing longer build times. Additionally, as individual developers, rather than being able to inherit most or all gems from an application base image, we are forced to install the full set of gems when first setting up a development environment. - Dockerfile is now used by the automated build to build the exercism/exercism.io base image. See https://hub.docker.com/r/exercism/exercism.io/ - docker-compose builds Dockerfile.dev, which is built FROM the public exercism/exercism.io docker image. This Dockerfile need only contain commands specific to the development environment and changes from the local git repository that need to be built. Presently, it checks for new gems to install. - Dockerfile: Set WORKDIR before RUN bundle install to invalidate one fewer layer when the bundle is updated.
- Loading branch information