Skip to main content

Docker

These docker tips apply to any docker compose file but in the examples below refer to a fictive turn-signals example.

Docker compose services

A docker compose file defines multiple services that work together. In RemotiveLabs topology, these services typically represent:

  • Behavioral models (ECU simulations) or Mocks
  • Test Runners, jupyter notebooks or something else communicating with the topology.
  • RemotiveBroker instances

Starting services

Start all services in the compose file

docker compose -f docker-compose-turn-signals-can.yml up --build

or in detached more by adding -d

docker compose -f docker-compose-turn-signals-can.yml up --build -d

Start a specific service in the compose file by adding the service name

docker compose -f docker-compose-turn-signals-can.yml up --build bcm

Notice that when starting a single specific service, dependent services such as RemotiveBrokers are automatically started, but in detached mode, so only the logs from the specified service are shown in the terminal.

Stop all services and networks

docker compose -f docker-compose-turn-signals-can.yml down

Remember to down once you are done and before changing the docker-compose file.

Check container logs

Get logs from all services

docker compose -f docker-compose-turn-signals-can.yml logs

Follow the logs by adding -f

docker compose -f docker-compose-turn-signals-can.yml logs -f

and for one specific service by adding -f and the service name

docker compose -f docker-compose-turn-signals-can.yml logs -f bcm

List all services in the compose file

docker compose -f docker-compose-turn-signals-can.yml config --services

Troubleshooting

Sometimes it's necessary to not only restart the containers, but also the entire docker daemon. With a standard Docker installation, in a systemd OS run service docker restart.