Professional Documents
Culture Documents
Docker Install
Docker Install
Docker Install
04 instance
apt-get update
wget -qo- https://get.docker.com/ | sh
apt install docker.io -y
___________________________________________________________________________________
____
docker version
docker --help
docker info
docker images
(Image is a template for the environment that you want to run and when you run a
image you get a container)
Images:
Creating Container
i -> input
t -> terminal
--name : Make your own name of a container
docker ps
docker ps -a
Option 1:
or
Option 2:
Docker logs
Live Logs
docker ps -l
(Display latest container whether active or inactive)
docker ps -q
(Display only active container id)
docker ps -aq
(Display all active and inactive container id)
Port Forwarding
docker pull tutum/hello-world
-p is Port
Example : http://ec2-54-161-80-134.compute-1.amazonaws.com/
or
exit
___________________________________________________________________________________
_________
apt-get update
apt-get install figlet
git --version
apt-get install git -y
Apply
git --version
At Ubuntu VM or Container O/s, installed figlet and git
exit
Your Own Images (creating your image. This is called Build, customization of
images)
docker commit -m "Ubuntu Figlet" -a "Ram" <Container Id> <Your Image Name>
-m indicates which message you want to supply
-a indicates Author Name
<Your Image Name> : Need to provide <Docker Hub Username>/<Your Image Name>:<Tag
Name>
docker commit -m "myubuntu" -a "suraj" 0622115b8959 suraj2508/ubuntu:V1
docker images
docker login
(Docker connect to Docker Hub)
docker push <Docker Images>
Go to Docker Hub Repoistory where you can get image which you uploaded
___________________________________________________________________________________
_______________