You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever we run the ./launch_only_docker.sh shell file, it creates a new docker container with a randomly generated name. At the same time, the command line (cmd) that we just executed the shell file in gets hijacked by the container. This means that our cmd is now inside of the container rather than the main computer.
Sometimes we want to have another cmd connected to the container to execute additional commands. But in order to do so, we must manually type in this random name it generated. This is annoying to do.
How to Implement
Update the ./launch_only_docker.sh shell file so that the container name is trickfirerobot by default. Add a new shell file to execute called ./connect_to_container.sh that will connect to the container with the name trickfirerobot. This will save time by preventing us from typing the command over and over.
Notes
You might have to run commands using sudo. Password is trickfire.
Run sudo docker container list to see all the running containers. This will display the name of the container
Run sudo docker exec -it trickfirerobot /bin/bash to connect to the container
The text was updated successfully, but these errors were encountered:
Context
Whenever we run the
./launch_only_docker.sh
shell file, it creates a new docker container with a randomly generated name. At the same time, the command line (cmd) that we just executed the shell file in gets hijacked by the container. This means that our cmd is now inside of the container rather than the main computer.Sometimes we want to have another cmd connected to the container to execute additional commands. But in order to do so, we must manually type in this random name it generated. This is annoying to do.
How to Implement
Update the
./launch_only_docker.sh
shell file so that the container name istrickfirerobot
by default. Add a new shell file to execute called./connect_to_container.sh
that will connect to the container with the nametrickfirerobot
. This will save time by preventing us from typing the command over and over.Notes
sudo
. Password istrickfire
.sudo docker container list
to see all the running containers. This will display the name of the containersudo docker exec -it trickfirerobot /bin/bash
to connect to the containerThe text was updated successfully, but these errors were encountered: