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
chaymaekhl
Categories
3 categories in total
ubuntu
open
docker
open
container
open
Author
10 person written this
chaymaekhl
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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Image description

the End...

container Article's
30 articles in total
Favicon
How to run a Nginx-web server
Favicon
Docker Basics
Favicon
What is Kubernetes Vs Terraform
Favicon
It is time to express your intention ,before you really code
Favicon
Docker Hands-on: Learn Docker Volume and Bind Mounts with Sample Projects using NGINX
Favicon
Can I start and stop Docker Desktop using CLI?
Favicon
The Power of Containers: Why Docker is Essential in Cloud, AI, Software Engineering and DevOps
Favicon
Docker Tutorial and Easy Guide to Master Dockerfile, Images, Containers, Commands, Volume, Network, and Compose
Favicon
Mastering the Container-Presenter Pattern in Angular: A Deep Dive
Favicon
Terraform: Use Template file for AWS CodeDeploy AppSpec file
Favicon
Building a PSR-11 Compatible Dependency Injection Container with PHP 8.4 Lazy Objects
Favicon
PnR: Configuration-Intention Driven Container Orchestration with Go's Platform Abstraction
Favicon
Why Rootless Containers Matter: A Security Perspective
Favicon
How to Install Tailscale in a Proxmox CE 8.2 LXC Container (AlmaLinux 9)
Favicon
Create a container using the Ubuntu image in Docker.
Favicon
Kubernetes คืออะไร? แบบ Dev เห็นภาพ
Favicon
A brief breakdown of Kubernetes architecture
Favicon
Docker Image Optimization: Reducing Size for Faster Deployments
Favicon
Docker
Favicon
Dockerfile Anti-Patterns: What Not to Do
Favicon
Docker Layer Caching Explained: Tips to Improve Build Times
Favicon
Homemade application firewall for Linux
Favicon
Kubernetes: Introduction
Favicon
Pod Security with K8Studio
Favicon
Docker ARG vs ENV: Understanding Build-time and Runtime Variables
Favicon
Containerize Rust Application in 2 Minutes using Docker Init
Favicon
What is a Container Registry
Favicon
How to Use Docker to Improve Your Development Workflow: A Complete Guide
Favicon
Effortlessly Dockerize Your Vite-React Application
Favicon
Docker Networking every developer should know

Featured ones: