Cobalt includes minimal [Docker image]docker.com definitions for simplifying managing build environments.
The instructions below assume Docker is installed and is able to run basic
docker-compose command is expected to be available as well.
Note: Docker build images are currently provided as experimental, and for reference only.
The simplest usage is:
docker-compose run <platform>
By default, a debug build will be built, with
cobalt as a target. You can override this with an environment variable, e.g.
docker-compose run -e CONFIG=devel -e TARGET=nplb <platform>
where config is one of the four optimization levels, debug, devel, qa and gold, and target is the build target passed to
See Cobalt README for full details.
Builds will be available in your
NB! Note that Docker runs processes as root user by default, hence output files in
src/out/<platform> directory have
root as file owner.
To parametrize base operating system images used for the build, pass BASE_OS as an argument to docker-compose as follows:
docker-compose build --build-arg BASE_OS="ubuntu:bionic" base
This parameter is defined in
docker/linux/base/Dockerfile and is passed to Docker
FROM ... statement.
Available parameters for customizing container execution are:
baseimage at build time to select a Debian-based base os image and version. Defaults to Debian 9.
ubuntu:xenialare other tested examples.
docker-compose.yml contains the currently defined experimental build configurations. Edit or add new
service entries as needed, to build custom configurations.
To debug build issues, enter the shell of the corresponding build container by launching the bash shell, i.e.
docker-compose run linux-x64x11 /bin/bash
and try to build cobalt with the usual
gyp / ninja flow.