Prerequisites
64-bit Ubuntu 16.04 server
Ubuntu 16.04 Operating System
Step1 Installing Docker
First, add the GPG key for the official Docker repository to the system:
$curl -fsSL https://download.docker.com/linux/ubuntu/gpg |sudo apt-key add -
Add the Docker repository to APT sources:
$sudo add-apt-repository "deb [arch=amd64]
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
update the package database with the Docker packages
from the newly added repo:
$sudo apt-get update
Make sure you are about to install from the Docker repo
instead of the default Ubuntu 16.04 repo:
$apt-cache policy docker-ce
Check that its Running: $sudo systemctl status docker
Step2 Executing the Docker Command Without Sudo
$sudo usermod -aG docker ${USER}
$sudo usermod -aG docker username
restart the machine $sudo shutdown -r now
verify the docker commands are running without sudo:
$docker info
step3 Working with Docker Images
$docker search ubuntu
$docker pull ubuntu
$docker run ubuntu
$docker images
step4 Running a Docker Container
$docker run -it ubuntu
root@d9b100f2f636:/#
step5 Pushing Docker Images to a Docker Repository
$docker login -u docker-registry-username
$docker push docker-registry-username/docker-image-name
Friday, 7 July 2017
Wednesday, 14 June 2017
Write a bash script which remove all the ECS-Task Definition except the latest one
How do we install the PhpMyAdmin on ec2 instance and dockerize the phpmyadmin
write a bash script which remove all the images from the ECR except the latest image
Write a bash script which remove the instance from ECS cluster and chef server
Starting the new ECS task on the ec2 instances using the latest TaskDefinition of EC2 container using bash script
Stopping the ECS Task which are running on ec2 instances using bash script
Subscribe to:
Posts (Atom)