Start container setup
This section shows you how to use Docker® Compose to start containers and check their status.
- 1. Use the command
sudo make run-containersto start the container with Docker® Compose
# sudo make run-containers
docker compose up -d
[+] Running 3/3
Network container-network Created 0.3s
Container mosquitto Started 1.2s
Container tc31-xar-base Started 1.2s- 2. According to the file
docker-compose.yaml, this command starts the containerstc31-xar-baseandmosquittoin the defined container networkcontainer-networkon the host. - 3. To check the status of the containers, execute the command
sudo make list-containers:
# sudo make list-containers
docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mosquitto eclipse-mosquitto "/docker-entrypoint.…" mosquitto About a minute ago Up About a minute 0.0.0.0:1883->1883/tcp, :::1883->1883/tcp
tc31-xar-base tc31-xar-base "/bin/sh /app/entryp…" tc31-xar-base About a minute ago Up About a minute 8016/tcp, 48898/tcp, 48899/udp