Tuesday, 24 October 2017
THE LINUX STUFF: Docker Commands Sheet
THE LINUX STUFF: Docker Commands Sheet: sai-HP ~ # docker version Client: Version: 1.10.2 API version: 1.22 Go version: go1.5.3 Git commit: c3959b1 Built: Mo...
Docker Commands Sheet
sai-HP ~ # docker version
Client:
Version: 1.10.2
API version: 1.22
Go version: go1.5.3
Git commit: c3959b1
Built: Mon Feb 22 21:37:01 2016
OS/Arch: linux/amd64
Server:
Version: 1.10.2
API version: 1.22
Go version: go1.5.3
Git commit: c3959b1
Built: Mon Feb 22 21:37:01 2016
OS/Arch: linux/amd64
sai-HP ~ # docker info
Containers: 4
Running: 0
Paused: 0
Stopped: 4
Images: 4
Server Version: 1.10.2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 32
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: host bridge null
Kernel Version: 3.16.0-38-generic
Operating System: Ubuntu 14.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.72 GiB
Name: sai-HP
ID: 2PFW:N3WN:2X7R:KNT2:533T:FXFB:ZEZQ:IEK6:EB4A:AVOF:HAWE:ZVVO
WARNING: No swap limit support
sai-HP ~ # docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest ccc7a11d65b1 10 weeks ago 120.1 MB
<none> <none> e17b56e5200a 20 months ago 188 MB
hello-world latest 690ed74de00f 2 years ago 960 B
training/webapp latest 6fae60ef3446 2 years ago 348.8 MB
sai-HP ~ # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
sai-HP ~ # docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
27575d580ce7 e17b56e5200a "bash" 19 months ago Exited (0) About a minute ago hungry_almeida
c19b41e0ab1f e17b56e5200a "cat /etc/debian_vers" 19 months ago Exited (0) 19 months ago pupserver
a869a313280b e17b56e5200a "bash" 20 months ago Exited (0) 20 months ago agitated_payne
48240eb989f0 hello-world "/hello" 20 months ago Exited (0) 20 months ago goofy_colden
sai-HP ~ # docker images -q
ccc7a11d65b1
e17b56e5200a
690ed74de00f
6fae60ef3446
sai-HP ~ # docker top 27575d580ce7
Error response from daemon: Container 27575d580ce7 is not running
sai-HP ~ # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
sai-HP ~ # docker start 27575d580ce7
27575d580ce7
sai-HP ~ # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
27575d580ce7 e17b56e5200a "bash" 19 months ago Up 4 seconds hungry_almeida
sai-HP ~ # docker top 27575d580ce7
UID PID PPID C STIME TTY TIME CMD
root 5370 1857 0 16:12 pts/7 00:00:00 bash
sai-HP ~ #
sai-HP ~ # docker stop 27575d580ce7
27575d580ce7
sai-HP ~ # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
sai-HP ~ # docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
27575d580ce7 e17b56e5200a "bash" 19 months ago Exited (0) 16 seconds ago hungry_almeida
c19b41e0ab1f e17b56e5200a "cat /etc/debian_vers" 19 months ago Exited (0) 19 months ago pupserver
a869a313280b e17b56e5200a "bash" 20 months ago Exited (0) 20 months ago agitated_payne
48240eb989f0 hello-world "/hello" 20 months ago Exited (0) 20 months ago goofy_colden
sai-HP ~ # docker rm 27575d580ce7
27575d580ce7
sai-HP ~ # docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c19b41e0ab1f e17b56e5200a "cat /etc/debian_vers" 19 months ago Exited (0) 19 months ago pupserver
a869a313280b e17b56e5200a "bash" 20 months ago Exited (0) 20 months ago agitated_payne
48240eb989f0 hello-world "/hello" 20 months ago Exited (0) 20 months ago goofy_colden
sai-HP ~ #
Client:
Version: 1.10.2
API version: 1.22
Go version: go1.5.3
Git commit: c3959b1
Built: Mon Feb 22 21:37:01 2016
OS/Arch: linux/amd64
Server:
Version: 1.10.2
API version: 1.22
Go version: go1.5.3
Git commit: c3959b1
Built: Mon Feb 22 21:37:01 2016
OS/Arch: linux/amd64
sai-HP ~ # docker info
Containers: 4
Running: 0
Paused: 0
Stopped: 4
Images: 4
Server Version: 1.10.2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 32
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: host bridge null
Kernel Version: 3.16.0-38-generic
Operating System: Ubuntu 14.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.72 GiB
Name: sai-HP
ID: 2PFW:N3WN:2X7R:KNT2:533T:FXFB:ZEZQ:IEK6:EB4A:AVOF:HAWE:ZVVO
WARNING: No swap limit support
sai-HP ~ #
sai-HP ~ # docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest ccc7a11d65b1 10 weeks ago 120.1 MB
<none> <none> e17b56e5200a 20 months ago 188 MB
hello-world latest 690ed74de00f 2 years ago 960 B
training/webapp latest 6fae60ef3446 2 years ago 348.8 MB
sai-HP ~ # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
sai-HP ~ # docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
27575d580ce7 e17b56e5200a "bash" 19 months ago Exited (0) About a minute ago hungry_almeida
c19b41e0ab1f e17b56e5200a "cat /etc/debian_vers" 19 months ago Exited (0) 19 months ago pupserver
a869a313280b e17b56e5200a "bash" 20 months ago Exited (0) 20 months ago agitated_payne
48240eb989f0 hello-world "/hello" 20 months ago Exited (0) 20 months ago goofy_colden
sai-HP ~ # docker images -q
ccc7a11d65b1
e17b56e5200a
690ed74de00f
6fae60ef3446
sai-HP ~ # docker top 27575d580ce7
Error response from daemon: Container 27575d580ce7 is not running
sai-HP ~ # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
sai-HP ~ # docker start 27575d580ce7
27575d580ce7
sai-HP ~ # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
27575d580ce7 e17b56e5200a "bash" 19 months ago Up 4 seconds hungry_almeida
sai-HP ~ # docker top 27575d580ce7
UID PID PPID C STIME TTY TIME CMD
root 5370 1857 0 16:12 pts/7 00:00:00 bash
sai-HP ~ #
sai-HP ~ # docker stop 27575d580ce7
27575d580ce7
sai-HP ~ # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
sai-HP ~ # docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
27575d580ce7 e17b56e5200a "bash" 19 months ago Exited (0) 16 seconds ago hungry_almeida
c19b41e0ab1f e17b56e5200a "cat /etc/debian_vers" 19 months ago Exited (0) 19 months ago pupserver
a869a313280b e17b56e5200a "bash" 20 months ago Exited (0) 20 months ago agitated_payne
48240eb989f0 hello-world "/hello" 20 months ago Exited (0) 20 months ago goofy_colden
sai-HP ~ # docker rm 27575d580ce7
27575d580ce7
sai-HP ~ # docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c19b41e0ab1f e17b56e5200a "cat /etc/debian_vers" 19 months ago Exited (0) 19 months ago pupserver
a869a313280b e17b56e5200a "bash" 20 months ago Exited (0) 20 months ago agitated_payne
48240eb989f0 hello-world "/hello" 20 months ago Exited (0) 20 months ago goofy_colden
sai-HP ~ #
Tuesday, 29 August 2017
Steps Installing Minikube on Linux
Step 1: Install the hypervisor (VirtualBox)
sai-HP ~ # apt-get install virtualbox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libgsoap4 libvncserver0 virtualbox-dkms
Suggested packages:
libvncserver0-dbg vde2 virtualbox-guest-additions-iso
Recommended packages:
virtualbox-qt
The following NEW packages will be installed:
libgsoap4 libvncserver0 virtualbox virtualbox-dkms
0 upgraded, 4 newly installed, 0 to remove and 609 not upgraded.
Need to get 14.7 MB of archives.
After this operation, 63.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
......
......
......
step2 :
sai-HP ~ # apt-get update
Ign http://dl.google.com stable InRelease
Hit http://dl.google.com stable Release.gpg
Hit http://dl.google.com stable Release
Ign http://dl.google.com stable InRelease
Hit http://dl.google.com stable Release.gpg
Hit http://dl.google.com stable Release
....
....
....
step3 : Install minikube
sai-HP ~ # curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.20.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 78.7M 100 78.7M 0 0 5308k 0 0:00:15 0:00:15 --:--:-- 6105k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 78.7M 100 78.7M 0 0 5308k 0 0:00:15 0:00:15 --:--:-- 6105k
step4 : Start minikube
sai-HP ~ # minikube start
There is a newer version of minikube available (v0.21.0). Download it here:
https://github.com/kubernetes/minikube/releases/tag/v0.21.0
To disable this notification, run the following:
minikube config set WantUpdateNotification false
========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
To disable this message, run the following:
minikube config set WantKubectlDownloadMsg false
========================================
Starting local Kubernetes v1.6.4 cluster...
Starting VM...
Downloading Minikube ISO
90.95 MB / 90.95 MB [==============================================] 100.00% 0s
Moving files into cluster...
Setting up certs...
Starting cluster components...
Connecting to cluster...
Setting up kubeconfig...
Kubectl is now configured to use the cluster.
There is a newer version of minikube available (v0.21.0). Download it here:
https://github.com/kubernetes/minikube/releases/tag/v0.21.0
To disable this notification, run the following:
minikube config set WantUpdateNotification false
========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
To disable this message, run the following:
minikube config set WantKubectlDownloadMsg false
========================================
Starting local Kubernetes v1.6.4 cluster...
Starting VM...
Downloading Minikube ISO
90.95 MB / 90.95 MB [==============================================] 100.00% 0s
Moving files into cluster...
Setting up certs...
Starting cluster components...
Connecting to cluster...
Setting up kubeconfig...
Kubectl is now configured to use the cluster.
sai-HP ~ #
step5 : Check the status
sai-HP ~ # minikube status
========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
To disable this message, run the following:
minikube config set WantKubectlDownloadMsg false
========================================
minikube: Running
localkube: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100
========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
To disable this message, run the following:
minikube config set WantKubectlDownloadMsg false
========================================
minikube: Running
localkube: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100
step 6: Stop minikube
sai-HP ~ # minikube stop
========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
To disable this message, run the following:
minikube config set WantKubectlDownloadMsg false
========================================
Stopping local Kubernetes cluster...
Machine stopped.
sai-HP ~ # minikube status
========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
To disable this message, run the following:
minikube config set WantKubectlDownloadMsg false
========================================
minikube: Stopped
localkube:
kubectl:
sai-HP ~ #
Installing kubectl on Linux
sai-HP ~ # curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 68.9M 100 68.9M 0 0 5528k 0 0:00:12 0:00:12 --:--:-- 6228k
sai-HP ~ # chmod +x ./kubectl
sai-HP ~ # sudo mv ./kubectl /usr/local/bin/kubectl
sai-HP ~ # kubectl config view
apiVersion: v1
clusters:
- cluster:
certificate-authority: /root/.minikube/ca.crt
server: https://192.168.99.100:8443
name: minikube
contexts:
- context:
cluster: minikube
user: minikube
name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
user:
client-certificate: /root/.minikube/apiserver.crt
client-key: /root/.minikube/apiserver.key
sai-HP ~ #
sai-HP ~ # kubectl cluster-info
Kubernetes master is running at https://192.168.99.100:8443
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Subscribe to:
Posts (Atom)