make docker-up
Introduction
make docker-up makes sure the workspace .env is right, then starts the CLI container without entering it. Use it in a script, or to apply your changes to docker-compose.yml.
make docker-up
๐ฉบ SPLENT CLI pre-flight
...
โ
Pre-flight passed.
๐ณ Starting containers...
๐ณ Using UID=1000 GID=1000
What it runs
env-preparecreates or repairs../.env.- The host pre-flight checks Docker, Compose, gitconfig and ssh, and validates the whole
.env. _drop-legacy-climoves a legacy CLI container into thesplent_cliCompose project. It acts only whensplent_cli_containerorsplent_networkbelongs to another project, and then prints๐งน Moving the CLI container and network to the splent_cli Compose project.... The container keeps no state, since the workspace is a bind mount, so it is removed and the next step creates it again. The network is recreated too, unless running products still use it.- Starts the stack with your UID and GID, so the files the container creates belong to you, not
root.
HOST_UID=<uid> HOST_GID=<gid> docker compose -f docker/docker-compose.yml up -d
Running commands in the container
The container runs as the splent user under an init that reaps what each docker exec leaves behind.
A docker exec without -u splent runs as root. Its Python bytecode then goes to /tmp/splent-root-pycache, outside your working copies. Pass -u splent all the same, so everything else a command writes belongs to you.
docker exec -u splent -w /workspace splent_cli_container splent product:list
See also
make setuprunsdocker-up, then opens the shell.make clienters a running container.