When starting multiple containers there sometimes are dependencies between them. Right now it seems like the all start at once.
For the CLI this could be something like:
set container name $CONTAINER depends $OTHER-CONTAINER
Withing the systemd file the following is needed:
Requires=vyos-container-$OTHER-CONTAINER.service After=vyos-container-$OTHER-CONTAINER.service
To be complete, maybe some health checking if necessary. Else the containers my start to fast after each other. The health check should be done with the container that is depended on.
set container name $OTHER-CONTAINER health command $in-continer-health-command set container name $OTHER-CONTAINER health interval $interval set container name $OTHER-CONTAINER health retries $retries
$command is some command which should be run inside the container
$interval is a time. Could be 5s
$retries is the amount of retries
With systemd it is something like:
HealthCmd="$in-container-health-command" HealthInterval=$interval HealthRetries=$retries Notify=healthy