Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the Docker Container Have a Consistent Name #36

Closed
VladimirKupryukhin opened this issue Jun 15, 2024 · 0 comments · Fixed by #44 · May be fixed by #39
Closed

Make the Docker Container Have a Consistent Name #36

VladimirKupryukhin opened this issue Jun 15, 2024 · 0 comments · Fixed by #44 · May be fixed by #39
Assignees
Labels
Good First Issue Something to tackle as a new member Workload Light A few simple changes

Comments

@VladimirKupryukhin
Copy link
Contributor

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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment