Main image: install Rails from a tarball
Since the very beginning of the Heptapod project, we've made a full repository of the various GitLab components in the Docker image, notably the Rails application.
It's been really useful for development, allowing to use Mercurial directly to manage the sources, but it's very heavy and slow to build, even with the various mitigations that we have (prewarm in an early layer, pull a precise branch or revision).
Later on, the heptapod-dev
image has been introduced, with its separate set of "live" revisions and some utilities. Because the heptapod
clone is already there in the main image, heptapod-dev
itself is relatively thin.
Nowadays, heptapod-dev
is less important for development. It would be fair if the main image was constructed out of a tarball and the heavy conversion into a repository would be done in heptapod-dev
. The build would be way faster, and the image would weigh some hundreds of megabytes less.
The external clone/pull of a source repository for exposition as a tarball to Docker build
has to be done anyway for #4 (closed)
Same could be done with heptapod-shell, but it's mildly more complicated and the benefits are smaller. Also, once we are on GitLab 12.4, it will be a pure Go component, externally compiled like heptapod-workhorse
.