Makefile
Host-side Make targets for setting up and entering the SPLENT CLI environment.
Overview
The CLI repository ships with a Makefile that splits targets across two files:
makefiles/Makefile.setup— environment preparation and Docker lifecyclemakefiles/Makefile.cli— shortcut to enter the running container
All commands are run on the host machine, not inside the container.
Targets
make setup
Full first-time setup in one step.
make setup
Runs in sequence: env-prepare → docker-up → cli-enter.
make setup-rebuild
Tear down and rebuild the environment from scratch.
make setup-rebuild
- Stops existing containers (
docker compose down -v --remove-orphans) - Removes old Docker images (
docker image prune -a -f) - Rebuilds images without cache (
docker compose build --no-cache) - Starts fresh containers
- Enters the CLI shell
Use this when the Docker image is stale or after major dependency changes.
make env-prepare
Initialises the .env file from the example template.
make env-prepare
- Copies
.env.example→../.envif it does not already exist. - Injects
SPLENT_HOST_PROJECT_DIRautomatically:- Local machine: uses the real absolute path of the workspace.
- Vagrant: injects
/workspaceinstead.
Safe to run multiple times — skips the copy if .env already exists.
make docker-up
Starts the Docker Compose stack.
make docker-up
Equivalent to:
HOST_UID=<uid> HOST_GID=<gid> docker compose -f docker/docker-compose.yml up -d
The host user’s UID/GID are forwarded so file permissions inside the container match the host.
make cli-enter
Enters the running CLI container as the splent user.
make cli-enter
Uses setpriv to drop into the splent user session with the correct UID, GID, and Docker socket group. Loads /home/splent/.bashrc so the full shell environment is available.
make cli
Alias for cli-enter. Shorter to type during day-to-day work.
make cli
Typical workflows
First time:
make setup
Day-to-day (containers already running):
make cli
After changing Docker config or dependencies:
make setup-rebuild