menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Devops News

>

What happe...
source image

Dev

2w

read

43

img
dot

Image Credit: Dev

What happens when you run `docker run ubuntu`

  • When you run 'docker run ubuntu', Docker checks for the Ubuntu image locally and pulls it from Docker Hub if not found.
  • Docker creates a new container instance from the Ubuntu image and runs the default command, which is usually 'CMD ["bash"]'.
  • Without the '-it' flag, the container may exit immediately as it lacks an interactive shell or process to keep it running.
  • Using 'docker run -it ubuntu' provides an interactive terminal session inside the container, allowing you to interact with it.

Read Full Article

like

2 Likes

For uninterrupted reading, download the app