This document describes how to run the SPLed project in Docker containers.
-
Build and start the development container:
docker-compose up -d spled
-
Enter the container for interactive development:
docker-compose exec spled bash -
Inside the container, build a variant:
./build.sh --build --variant Disco
-
Run tests:
./build.sh --build --build-kit test --variant Disco
-
Build the Docker image:
docker build -t spled . -
Run the container interactively:
docker run -it --rm -v ${PWD}:/workspace spled -
Build inside the container:
./build.sh --build --variant Disco
The project supports multiple variants:
Disco- Default variantSleep- Sleep mode variantSpa- Spa mode variantBase/Dev- Base development variant
The Docker container includes multiple toolchains:
- Clang/LLVM - Default for production builds (native Linux)
- GCC - Used for test builds (native Linux)
- MinGW-w64 - Cross-compilation to Windows (available but not configured by default)
Note: The Docker container uses Linux-native toolchains by default. Windows-specific MinGW toolchain from Scoop is replaced with cross-compilation capability.
The build.sh script supports these options:
--install- Install dependencies--build- Build the project--clean- Clean build artifacts--variant <name>- Specify variant to build (default: Disco)--build-kit <kit>- Specify build kit: "prod" or "test" (default: prod)--build-type <type>- Specify build type (Debug, Release, etc.)--target <target>- Specify build target (default: all)
-
Start the development container:
docker-compose up -d spled
-
Attach to the container:
docker-compose exec spled bash -
Make changes to your code (files are mounted from host)
-
Build and test:
./build.sh --clean --build --variant Disco ./build.sh --build --build-kit test --variant Disco
Build artifacts are stored in a Docker volume named spled-build to persist between container runs.
To use VS Code with the Docker container:
- Install the "Dev Containers" extension
- Open the project folder in VS Code
- Use "Dev Containers: Reopen in Container" command
Alternatively, you can attach VS Code to the running container:
- Start the container:
docker-compose up -d spled - In VS Code, use "Dev Containers: Attach to Running Container"
- Select the
spled-devcontainer
If you encounter permission issues with mounted volumes:
# Fix ownership (run from host)
sudo chown -R $USER:$USER build/Check Docker logs:
docker-compose logs spledTo completely rebuild the container:
docker-compose down
docker-compose build --no-cache
docker-compose up -d