Skip to content
Snippets Groups Projects
Commit 5fb81a81 authored by holzheim's avatar holzheim
Browse files

Updated instructions to start docker container

parent d308eed2
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ A `Docker image` is a **snapshot of an application or system** that has been pac ...@@ -56,7 +56,7 @@ A `Docker image` is a **snapshot of an application or system** that has been pac
In `Introduction to Robotics` we will provide you a `Docker image` that is a snapshot of an **Ubunutu operating system** with the **Robot Operating System (ROS)** installed and all the necessary additional libraries that will be necessary for this course. In `Introduction to Robotics` we will provide you a `Docker image` that is a snapshot of an **Ubunutu operating system** with the **Robot Operating System (ROS)** installed and all the necessary additional libraries that will be necessary for this course.
In the following section you will find information on how to install `Docker` and how to start a running `Docker container` as an instance of the `Docker image` we provided for this course. In the following sections you will find information on how to install `Docker` and how to start a running `Docker container` as an instance of the `Docker image` we provided for this course.
### Installing Docker ### Installing Docker
...@@ -69,7 +69,7 @@ After successfull installation, **open** `Docker Desktop`. The GUI should open a ...@@ -69,7 +69,7 @@ After successfull installation, **open** `Docker Desktop`. The GUI should open a
### Starting a Container to work with ROS ### Starting a Container to work with ROS
To make sure you can all start with the same working `ROS` environment we use a predefined *image* and *compose* file. Both are stored in this repository at [00_GettingStarted/docker/i2r/](docker/i2r/). To make sure you can all start with the same working `ROS` environment we use a predefined *image* and *compose* file. Both are stored in this repository at [00_GettingStarted/docker/i2r/](docker/i2r/).
Following the instructions to download the repository to your local machine and start the group of containers: Follow the instructions to download the repository to your local machine and start the group of containers:
1. Create a folder named ***i2r*** for the contents of the `Introduction to Robotics` course. 1. Create a folder named ***i2r*** for the contents of the `Introduction to Robotics` course.
2. Open this folder in `VS Code` by either starting `VS Code` from Terminal or by using the GUI. 2. Open this folder in `VS Code` by either starting `VS Code` from Terminal or by using the GUI.
...@@ -100,12 +100,33 @@ Following the instructions to download the repository to your local machine and ...@@ -100,12 +100,33 @@ Following the instructions to download the repository to your local machine and
```bash ```bash
docker compose up docker compose up
``` ```
This command will download the needed images and start two containers. One container named ***i2r-ros-1*** which contains a snapshot of an Ubuntu OS with ROS and additional packages installed. The second container is an auxiliary container named ***i2r-gui-1*** that will be used to inspect graphical user interfaces of applications started in the i2r-ros-1 container.
The terminal output will look the following:
![Terminal Output for *docker compose up*](images/docker_compose_up_terminal.png)
7. In the `Docker Desktop` GUI go to the *Containers* tab. You should see now, that there are two containers launched under the group name *i2r*. 7. In the `Docker Desktop` GUI go to the *Containers* tab. You should see now, that there are two containers launched under the group name *i2r*.
- Another option to inspect the containers is using the terminal.
![Docker Desktop GUI with group of containers running](images/docker_group_running.png)*`Docker Desktop` GUI: Inside the Containers tab you should find the started group of containers.*
- Another option to inspect the containers is using the terminal. (Note: If you are still in the terimal you executed the *docker compose up*, make sure to start a new terminl, but let the old terminal running.)
```bash ```bash
docker container ls --all docker ps --all
``` ```
The terminal output will look the following:
![Terminal output for *docker ps --all*](images/docker_ps_all_terminal.png)
There will be information like ID of the container, name of the image the container was build from etc.
8. To connect to the ***i2r-ros-1*** container, the container we will use to work with `ROS`, execute the following command from terminal:
```bash
docker exec -it i2r-ros-1 bash
```
<!-- blank line -->
<figure class="video_container">
<video controls="true" allowfullscreen="true" poster="images/docker_exec_rosContainer.png">
<source src="images/docker_exec_rosContainer_video.webm" type="video/webm">
</video>
</figure>
<!-- blank line -->
## In case of problems ## In case of problems
......
00_GettingStarted/images/docker_compose_up_terminal.png

207 KiB

00_GettingStarted/images/docker_exec_rosContainer.png

34.5 KiB

File added
00_GettingStarted/images/docker_ps_all_terminal.png

29.4 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment