Are you looking to run a base image and check things out inside with docker?

If you are just looking to run an image with docker and be able to interact with the shell then, what you need to do is:

docker run –rm -it –entrypoint /bin/bash <image>

Following is an example:

docker run –rm -it –entrypoint /bin/bash ubuntu:22.04

root@04cb2dfd61cc:/# ls

bin  boot  dev  etc  home  lib  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s