A local Docker container with a Container ID of 391441516e7a is running a Python application. Which command is used to connect to a bash shell in the running container? A. B. C. D.
docker exec -it 391441516e7a /bin/bash
Explanation:
docker exec: Used to execute a command in a running container.
-it: Runs the command interactively and allocates a TTY (terminal).
391441516e7a: The ID of the running container.
/bin/bash: Specifies that you want to open a Bash shell inside the container.
docker exec: run a command in a running container
e.g. sudo docker exec -ti <container_name> /bin/bash
log in to the running container through an interactive shell
https://github.com/etture/dev_notes/issues/10
B
Next, execute an interactive bash shell on the container.
docker exec -it ubuntu_bash bash
https://docs.docker.com/engine/reference/commandline/exec/
This section is not available anymore. Please use the main Exam Page.350-901 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
moslig
Highly Voted 2 years, 8 months agolente_kriebels
Highly Voted 2 years, 8 months agoal_mon
Most Recent 3 months, 1 week agoDave513
6 months, 3 weeks agomariodevx
7 months, 1 week agoTeringzooi
1 year, 7 months agodesignated
1 year, 8 months agoferock
2 years ago__al__
2 years, 2 months ago