Container, Docker

Docker – Basic Installation & Configuration

Youtube Video :-

Command :-

sudo yum install -y yum-utils \

  device-mapper-persistent-data \

  lvm2

sudo yum-config-manager \

    –add-repo \

    https://download.docker.com/linux/centos/docker-ce.repo

sudo yum install docker-ce

yum list docker-ce –showduplicates | sort -r

sudo systemctl start docker

sudo docker run hello-world

docker volume create portainer_data

docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

docker service create \

–name portainer \

–publish 9000:9000 \

–replicas=1 \

–constraint ‘node.role == manager’ \

–mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock \

portainer/portainer \

-H unix:///var/run/docker.sock

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s