Logo

dev-resources.site

for different kinds of informations.

Create a container using the Ubuntu image in Docker.

Published at
12/19/2024
Categories
ubuntu
docker
container
Author
Khalil Chaymae
Categories
3 categories in total
ubuntu
open
docker
open
container
open
Create a container using the Ubuntu image in Docker.

This post explains how to create a container for an Ubuntu Linux distribution in Docker. It's very easy to do using simple commands.

Step 1:
Run Docker Desktop on your Windows machine.
step 2:
Open the Command Prompt (CMD) and type the following command.

docker pull ubuntu

Image description

Step 3 :
Run the following command to create the container.

NB: If the Ubuntu image is not present on your machine:
Docker will automatically pull the Ubuntu image from Docker Hub, which is Docker's default image registry.
Once the image is downloaded, Docker will use it to create and start the container.
If the Ubuntu image is already present on your machine:
Docker will skip the pull step and directly use the existing local copy of the Ubuntu image to create and start the container.

docker run -it --name my-ubuntu-container ubuntu

Image description

the End...

Featured ones: