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
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
the End...
Top comments (0)