Build sdl2 program in docker image with cmake, run locally in arch-based os.
-
Compile stuff in the docker container:
docker compose up --build- This creates a
build-dirdirectory, runscmaketo configure the build, then runsmaketo perform the build. - The compiled file will be in
./build-dir/SDL2Test
- This creates a
-
Run the compiled program locally:
./build-dir/SDL2Test -
Enter the container to do stuff
docker compose run compiler bash -
Clean up
build-dirand build artifacts:sudo rm -rf build-dir -
Clean up docker container and network:
docker compose down