To create docker images, you need to install docker version >= 17.05 and make.
Dockerfile.buildercontains all the compile-time dependencies necessary to compile any of the Haskell services (it also downloads, builds and caches some Haskell libraries). This image is fairly large, ~1.7GB compressed.Dockerfile.depscontains all the run-time dependencies e.g. shared libraries, at a total size of ~52MB compressed.
Both of the above need to be built first (only once) to be able to actually build a service docker image.
Dockerfile.intermediate- based onDockerfile.deps/Dockerfile.builder, this is an intermediate image compiling all dynamically linked binaries (obtained when runningmake installin the top-level directory).Dockerfile.executable- based onDockerfile.deps/Dockerfile.intermediate, this extracts a single executable from the intermediate image, yielding a small image (~30MB compressed) with a single dynamically linked binary.
(from within the wire-server directory)
make docker-builder
make docker-depsmake docker-intermediate # recompiles all the haskell code
make docker-exe-brig # this only extracts one binary from the intermediate image above and makes it the default entrypoint. Nothing gets recompiledDockerfile.prebuilder- dependencies ofDockerfile.builderthat are expected to change very rarely (GHC, system libraries).