Welcome to ROSMASTER M1 repository
3.Docker Submission and Multi-Terminal Access
Docker Submission and Multi-Terminal Access
1. Docker Submission
1.1. Description
If you use the same script to launch Docker every time you boot your computer, modify the program inside Docker, and then exit Docker without submitting the changes, the next time you launch Docker using the same script, the original Docker will not be the modified version. Modified programs must be resubmitted to update Docker.
1.2. Committing the Docker Image
After entering a Docker image and modifying the program, enter the following command in the terminal to view the running Docker image.
xxxxxxxxxxdocker ps
What we need to pay attention to here is the Docker ID, which is f8086cb992f3, and the current Docker name, 192.168.2.51:5000/ros-humble:5.1.0. Once you know the ID and name, you can commit the current Docker image.
xxxxxxxxxxdocker commit f8086cb992f3 192.168.2.51:5000/ros-humble:5.1.0Above, we submitted the modified Docker container with the same Docker name, overwriting the current Docker container and preserving the modified program.
If you want to rename this container to a different name, you can run the following command:
xxxxxxxxxxdocker commit f8086cb992f3 192.168.2.51:5000/ros-humble:5.1.1The above command is equivalent to submitting the newly modified Docker container with the name 192.168.2.51:5000/ros-humble:5.1.1. We can verify the submission by typing docker imgaes.
xxxxxxxxxxdocker images
If we renamed the container to a different name, next time we want to use the same script to start the modified container, we need to enter the Docker script and modify it to the renamed Docker container. Here, we open it in the vim editor.
xxxxxxxxxxvim run_humble.shClick i to start typing your changes.

After entering your changes, save and exit. The next time you run this script to start Docker, the modified Docker container will be started.
2. Accessing the Same Docker Container from Multiple Terminals
Note: The tutorials for the Raspberry Pi and Jetson Nano boards all use Docker. Most of the tutorials require entering the same container terminal to run commands.
If a Docker container is already running, you can open another terminal on the host machine (the car) to view it:
- Viewing Running Docker Containers
xxxxxxxxxxdocker ps
Importantly remember the Docker ID.
- Now enter the following command to access the container terminal with the same ID.
xxxxxxxxxxdocker exec -it eade20b96389 /bin/bash
Once you've successfully entered the container, you can use this method to open multiple terminals and access the container.