1# How to build the docker images: 2 3In the root of the WZ repo: 4- `docker build -f docker/<subdir>/Dockerfile -t <build_image_name> .` 5 6For example: 7``` 8docker build -f docker/ubuntu-20.04/Dockerfile -t ubuntu . 9``` 10 11For more information, see the documentation on [`docker build`](https://docs.docker.com/engine/reference/commandline/build/). 12 13# How to build Warzone using the docker image: 14 15Beware of line ending mismatch between Windows and Linux when cloning repo. 16Replace `${pwd}` with your pwd command on your platform. 17 18### Ubuntu 19 20- via CMake 21``` 22docker run --rm -v ${pwd}:/code <build_image_name> cmake '-H.' -Bbuild -DCMAKE_BUILD_TYPE=Debug -G"Ninja" 23docker run --rm -v ${pwd}:/code <build_image_name> cmake --build build 24``` 25 26### Cross-compile (for Windows) 27 28- via CMake 29``` 30docker run --rm -v ${pwd}:/code <build_image_name> i686-w64-mingw32.static-cmake '-H.' -Bbuild -DCMAKE_BUILD_TYPE=Debug -G"Ninja" 31docker run --rm -v ${pwd}:/code <build_image_name> cmake --build build --target package 32``` 33This will build the full Windows (portable) installer package. 34 35# Tips 36 37### Using CMake 38 39The examples above build `DEBUG` builds. 40 41To build a Release mode build (with debugging symbols), change: 42- `-DCMAKE_BUILD_TYPE=Debug` 43to: 44- `-DCMAKE_BUILD_TYPE=RelWithDebInfo` 45