Docker DevOps

Install Docker in debian 9

##tambah repo indo

nano /etc/apt/sources.list

# nano /etc/apt/sources.list

#KAMBING-UI
deb http://kambing.ui.ac.id/debian/ stretch
 main contrib non-free
deb http://kambing.ui.ac.id/debian/ stretch-updates main contrib non-free
deb http://kambing.ui.ac.id/debian-security/ 
stretch/updates main contrib non-free

##Remove

apt-get -y remove docker docker-engine docker.io

##setup repo docker
apt-get update
apt-get install -y apt-transport-https ca-certificates wget software-properties-common
wget https://download.docker.com/linux/debian/gpg 
apt-key add gpg

echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" |  tee -a /etc/apt/sources.list.d/docker.list

apt-get update -y

apt-cache policy docker-ce

##install docker

apt-get -y install docker-ce

## start service
systemctl start docker
systemctl enable docker

##verify docker
docker run hello-world

##allow non root user to run docker

##Create a group “docker“, if it does not exist.

sudo groupadd docker

##Add your user to docker group, replace “raj” with your username.

sudo useradd raj

##Add a user to docker group.

sudo usermod -aG docker raj

##Log out and log back in. You should now be able to run Docker commands without prefixing sudo.

docker run hello-world
Klik untuk berbagi dengan orang lain
Baca Juga :  Cara Install Mysql pada Linux Mint Cinnamon

Similar Posts