Languages
[Edit]
EN

Docker - connect to container command line

6 points
Created by:
Richard-Bevan
413

Hi, today I would like to show you how we can login to docker container command line.

Quick solutions

Using /bin/sh

Using /bin/bash

Second option when our linux doesn't have /bin/sh, we need to use another shell /bin/bash

If we don't have /bin/bash then this command will output the error

(OCI runtime exec failed, more here: to problem description and solution)

Practical example

Edit

Practical example when our container name is: auth-service-container.

We simply replace 'PUT_CONTAINER_NAME_HERE' with our container name: 'auth-service-container'.

Output from command line:

We can read more about docker exec program here:

Alternative titles

  1. Docker - login to container command line
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Docker - useful wiki posts

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join