-
Notifications
You must be signed in to change notification settings - Fork 2
/
Command Help.txt
69 lines (57 loc) · 1.71 KB
/
Command Help.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Pre-installation
Install pre-requisite packages
1. sudo apt-get update
2. sudo apt-get install apt-transport-https ca-certificates curl
software-properties-common
Download apt-key for docker
1. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
2. sudo apt-key list
3. sudo apt-key fingerprint 0EBFCD88
Add docker repository
1. sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
2. sudo apt-get update
Installation
sudo apt-get install docker-ce
Check the installations
1. sudo docker run hello-world
2. sudo docker --version
3. sudo docker --info
Proxy Settings:
Add proxy to Docker Service
1. sudo mkdir /etc/systemd/system/docker.service.d
2. sudo gedit /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=https://172.16.19.10:80/"
Environment="HTTPS_PROXY=https:// 172.16.19.10:80 :8080/"
Environment="NO_PROXY=localhost,127.0.0.1,localaddress,.localdomain.com"
Restart Docker daemon
1. sudo systemctl daemon-reload
2. sudo systemctl show --property Environment docker
3. sudo systemctl restart docker
4. sudo docker run hello-world
Get rid of sudo
1. sudo groupadd docker
2. sudo usermod -aG docker $USER
3. su - $USER
Few commands to explore
1. docker run hello-world
2. docker info
3. docker –version
4. docker info
5. docker image ls
6. man docker
7. man docker container
8. docker container ls –all
9. docker stats
Getting Familiarize
docker pull busybox
docker run busybox
docker container ls --all
docker run busybox echo "Hello World"
docker run busybox echo $USER
docker run -it busybox
docker container ls --all
docker stats
docker container ls --all
docker run -it --rm busybox
docker run -it busybox