1. Open a new terminal to your docker container

You run the docker image as in:
~/Downloads/pcs3746-sistemas-operacionais/1$ ./run.sh
In your ubuntu, do:
docker ps, as in:
~/Downloads/pcs3746-sistemas-operacionais/1$ docker ps
CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS               NAMES
ded8427efd96        tiagoshibata/pcs3746   "/entrypoint.sh /def…"   5 hours ago         Up 5 hours                              focused_swartz

You may see that we have the docker image tiagoshibata running on a docker container with ID ded8427efd96. It running for 5 hours and it has an image name blessed by docker: focused_swartz.
Now, you may open another terminal and enter again in the docker container.
Do:
~/Downloads/pcs3746-sistemas-operacionais/1$ docker exec -ti focused_swartz bash
Note that you must insert the name given by "docker ps" and not necessarily focused_swartz.

~/Downloads/pcs3746-sistemas-operacionais/1$ docker exec -ti focused_swartz bash
root@ded8427efd96:/# 
root@ded8427efd96:/# su student
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

student@ded8427efd96:/$ ps ax
  PID TTY      STAT   TIME COMMAND
    1 pts/0    Ss+    0:00 /bin/bash /entrypoint.sh /default_cmd.sh
    7 pts/0    S+     0:00 su student -c env PATH=/usr/local/sbin:/usr/local/bin
    8 ?        Ss     0:00 /bin/bash /default_cmd.sh
 2616 ?        Sl     0:01 qemu-system-arm -M versatilepb -m 128M -nographic -ke
 2620 pts/1    Ss     0:00 bash
 2630 pts/1    S      0:00 su student
 2631 pts/1    S+     0:00 bash
 2640 pts/2    Ss     0:00 bash
 2650 pts/2    S      0:00 su student
 2651 pts/2    S      0:00 bash
 2658 pts/2    S+     0:00 arm-none-eabi-gdb -ex target remote:1234 /home/studen
 2666 pts/3    Ss     0:00 bash
 2675 pts/3    S      0:00 su student
 2676 pts/3    S      0:00 bash
 2682 pts/3    R+     0:00 ps ax
student@ded8427efd96:/$ 

Now you may see all the processes running on the ubuntu inside your docker image, specially, you may see qemu-system-arm.
That is it! You may create as many terminals to your docker container (an instance of your docker image) as you want.
In the next post, I will show how this new terminal may connect to qemu via gdb.





Comentários

Postagens mais visitadas deste blog

Basics on ARM processor

Assignments - 1

2. run gdb