spiegel-keyman/resources/docker-images
Markus Greiner 68b5c3463b
Merge pull request #14568 from keymanapp/maint/common/move-node-related-functions-out-of-utils.inc.sh-missing-parts
maint(common): rename and move node-related script functions into node.inc.sh
2025-08-21 11:00:46 +02:00
..
android maint(developer): use docker buildx to build docker images 2025-06-06 18:10:53 +02:00
base maint(common): on Windows build as root inside docker container 2025-08-18 17:50:29 +02:00
core maint(developer): use docker buildx to build docker images 2025-06-06 18:10:53 +02:00
developer maint(developer): use docker buildx to build docker images 2025-06-06 18:10:53 +02:00
linux maint(developer): use docker buildx to build docker images 2025-06-06 18:10:53 +02:00
web maint(developer): use docker buildx to build docker images 2025-06-06 18:10:53 +02:00
build.sh maint(common): disable path conversions on Windows 2025-08-18 17:50:28 +02:00
docker-build.inc.sh Merge pull request #14568 from keymanapp/maint/common/move-node-related-functions-out-of-utils.inc.sh-missing-parts 2025-08-21 11:00:46 +02:00
README.md Update resources/docker-images/README.md 2025-08-20 08:46:02 +02:00
run.sh maint(common): on Windows build as root inside docker container 2025-08-18 17:50:29 +02:00

Container

Docker containers that can be used to build Keyman on the respective platforms. They contain everything that a CI build agent needs to build for the platform.

Prerequisites

You'll need Docker Buildx installed to successfully be able to build the container images. This is most easily achieved by installing the official Docker version.

Currently it is not possible to use Podman instead of Docker due to a number of bugs and incompatibilities in the Podman implementation.

Building the images

To build the docker images:

resources/docker-images/build.sh

By default this will create 64-bit images for building Keyman Core, Keyman for Android, Keyman for Linux, Keyman for Web and (cross-platform parts of) Keyman Developer. These images are based on Ubuntu 24.04 with Node 20 and Emscripten 3.1.58 (for the exact versions, see minimum-versions.inc.sh). The images are named e.g. keymanapp/keyman-core-ci:default.

The versions can be changed, e.g.

resources/docker-images/build.sh --distro-version jammy --node 20

This will create an image named e.g. keymanapp/keyman-core-ci:ubuntu-jammy-java21-node20.16.0-emsdk3.1.58.

Once the image is built, it may be used to build parts of Keyman.

Building locally

It is possible to build locally with these images:

# build 'Keyman Core' in docker
resources/docker-images/run.sh :core -- core/build.sh --debug build

Note: For Core and Linux we put the generated binaries in a container specific directory because they are platform dependent.

If you build both with Docker and directly with the build scripts, it is advisable to run a git clean -dxf before switching between the two. The reason is that the Docker images use a different user, so that paths will be different.

Warning: On Windows, don't mix building in Windows/git-bash and WSL/Docker without a full clean (git clean -fdx) of the repository. Mixed building will fail for many reasons, including, among others:

  • many CLI tools have different names, and references are cached in configure steps
  • cached paths may be stored with backslashes which work only on Windows
  • Keyman Core has varying targets based on the build platform
  • npm writes build-platform-specific settings/modules in node_modules
  • meson creates build-platform-specific build files

Running tests locally

To run the tests locally, use the run.sh script:

# Run common/web tests
resources/docker-images/run.sh :web -- common/web/build.sh --debug test