There is an issue that the Docker containers cannot modify the
files on KEYMAN_ROOT, since the user running build and tests on
Docker does not have the same gid and uid as the host user starting
the container.
The issue is solved by temporarily changing the uid and gid to
match the container user's uid and gid.
Test-bot: skip
Build-bot: skip
It is now possible to keep the Docker images for building and testing
in a Docker container registry.
This is the first part of changes for #13954. The GitHub actions part is
missing.
Fixes: #13954
Test-bot: skip
Build-bot: skip
Fixed some errors found during tests for #13954 when running
resources/docker-images/run.sh with targets ":linux" and ":web".
Build-bot: skip
Test-bot: skip
This change verifies that `docker buildx` is available and then uses that
for building the images. For that we apparently need the magic line at
the top of the `Dockerfile`s and set the environment variable
`DOCKER_BUILDKIT`. This solves a problem building docker images on
Linux with an older Docker version where the heredocs didn't work.
This change fixes two issues in the Linux docker image that showed up
when running tests:
- some directories had wrong permissions
- we have to build keyman-system-service in a docker-specific directory
as well so that the location of the service executable can be found
when running the tests in docker
We need to run `apt-get update` first before trying to install packages.
We did update the package index when we built the base image, but that
might have been some time ago so that the index is now outdated.
- use KEYMAN_USE_NVM and KEYMAN_USE_EMSDK
- pre-install node (where necessary) to prevent having to do it on each
build
- adjust to current `master`
- fix a few bugs in the Dockerfile
- get required node version from package.json (through
`shellHelperFunctions.sh`)
This change allows to build a docker image that can build Keyman
for Linux with test coverage reports, and installs the necessary
dependencies for running integration tests.