Files
ortools-clone/tools/docker/README.md

53 lines
1.1 KiB
Markdown
Raw Normal View History

2021-09-06 13:08:03 +02:00
# CI: Makefile/Docker testing
2021-12-03 17:45:12 +01:00
To test the build on various distro, we are using docker containers and a
Makefile for orchestration.
2021-09-06 13:08:03 +02:00
pros:
2021-12-03 17:45:12 +01:00
* You are independent of third party CI runner config (e.g. github actions
runners or Travis-CI VM images).
2021-09-06 13:08:03 +02:00
* You can run it locally on any unix system.
* Most CI provide runner with docker and Makefile installed.
cons:
* Only GNU/Linux distro supported.
* Could take few GiB (~30 GiB for all distro and all languages)
* ~500MiB OS + C++/CMake tools,
* ~150 MiB Python, wheel,
2021-12-03 17:45:12 +01:00
## Usage
2021-09-06 13:08:03 +02:00
To get the help simply type:
```sh
make
```
note: you can also use from top directory
```sh
make --directory=tools/docker
```
2021-12-03 17:45:12 +01:00
### Example
2021-09-06 13:08:03 +02:00
For example to test inside an `Alpine` container:
```sh
make alpine-edge_test
```
2021-12-03 17:45:12 +01:00
## Docker layers
2022-03-02 15:25:04 +01:00
Dockerfile is split in several stages.
2021-09-06 13:08:03 +02:00
2022-03-03 14:08:37 +01:00
![docker](docs/deps.svg)
2021-09-06 13:08:03 +02:00
2021-12-03 17:45:12 +01:00
### Docker aarch64 on x86_64 machine
You can build and run aarch64 docker container on a x86_64 by enabling qemu
support:
2021-09-06 13:08:03 +02:00
```sh
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
```
ref: https://github.com/multiarch/qemu-user-static#getting-started