Friday, October 1, 2021
The beauty of Docker is that you can run a very lightweight image of another Linux distro on your host system. In this post we will be pulling the latest image of CentOS into our docker container on our Ubuntu server.
Step-by-Step:
1. Open the terminal in Ubuntu, then make sure docker is running by typing service docker status, you should see something a message like the image below
2. Type in the following command docker run --name test -it centos /bin/bash . The command tells Ubuntu to run docker with the name dev in interactive mode with an emulated terminal using the CentOS image with the bash shell. If there's no local image docker will pull the latest image from CentOS
3. After the command is completed you will running inside the CentOS container, you can tell by the changes in the prompt
4. The weird number is in the prompt is the image ID of the CentOS image that we pulled. If you type service docker status you will get an error message saying it does not recognize the command because docker is installed in the host machine not the CentOS image
5. To get out of the CentOS container just type exit and you will get back to the host system
Step-by-Step:
1. Open the terminal in Ubuntu, then make sure docker is running by typing service docker status, you should see something a message like the image below
2. Type in the following command docker run --name test -it centos /bin/bash . The command tells Ubuntu to run docker with the name dev in interactive mode with an emulated terminal using the CentOS image with the bash shell. If there's no local image docker will pull the latest image from CentOS
5. To get out of the CentOS container just type exit and you will get back to the host system
Posts On Dockers
- Installing Docker On Ubuntu Server
- Installing Docker On CentOS
- Adding Docker Repository Key and Updating Docker To Get The Latest Version
- Docker : Pull The Latest Fedora Image Into A Ubuntu Server
- Docker : Pull The Latest CentOS Image Into A Ubuntu Server
- Docker : Adding Non Root Users To The Docker Group In Ubuntu
- Docker : Adding Non Root Users To The Docker Group In CentOS
- Docker : Command to See What Containers Are Running
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu
Thanks for giving this much important information. it will really help the people. I also want to share some important informatio. Unlocking the potential of parenthood, artificial insemination kits offer a tailored approach to conception. The cost varies, influenced by factors like brand, included components, and efficacy. Ranging from budget-friendly options to more artificial insemination kit cost pricing typically reflects the quality and convenience provided. With the power to bring dreams to fruition, the cost of these kits is an investment in the journey towards creating new life.
ReplyDelete