- docker ps: list the docker containers
- docker logs: check the docker’s standard output
- docker stop: stop the docker container
- docker start: start the docker container
- docker version: list the docker client/GO version
- docker top [container]: check the docker’s process
- docker rm container: remove the docker
- docker images: list the local docker images
- docker pull [image]: pull down the docker images
- docker search [image]: search docker image in the docker hub
- docker run –d [container]: run the docker as a daemon.
logo

Showing posts with label docker. Show all posts
Showing posts with label docker. Show all posts
Monday, 1 September 2014
Friday, 8 August 2014
Install docker on ubuntu 12.04
1. Update the kernel to 3.8 above
When 12.04 was installed, the kernel was 3.3, we need to update the kernel to 3.8 above to better support dockersudo apt-get update
sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring
sudo reboot
then we can check
stack@openstack:~$ uname -a
Linux openstack 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
2. Add docker key to your local key repository
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9you can check as
stack@openstack:~$ sudo apt-key list
/etc/apt/trusted.gpg
--------------------
pub 1024D/437D05B5 2004-09-12
uid Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
sub 2048g/79164387 2004-09-12
pub 1024D/FBB75451 2004-12-30
uid Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>
uid Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>
pub 4096R/C0B21F32 2012-05-11
uid Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>
uid Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>
pub 4096R/EFE21092 2012-05-11
uid Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>
pub 2048R/A88D21E9 2013-08-16
uid Docker Release Tool (releasedocker) docker@dotcloud.com
check by :
uid Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>
pub 2048R/A88D21E9 2013-08-16
uid Docker Release Tool (releasedocker) docker@dotcloud.com
3. Add the repository to your APT sources
#sudo sh –c “echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list”check by :
stack@openstack:~$ cat /etc/apt/sources.list.d/docker.list
deb https://get.docker.io/ubuntu docker main
check by
stack@openstack:~$ ps -ef | grep docker
root 1419 1 2 22:19 ? 00:00:55 /usr/bin/docker -d
check by
stack@openstack:~$ sudo docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a4c13d74f23a ubuntu:14.04 /bin/echo hello worl 11 minutes ago Exited (0) 11 minutes ago tender_heisenberg
hello world
deb https://get.docker.io/ubuntu docker main
4. Install docker
sudo apt-get update ; sudo apt-get install -y lxc-dockercheck by
stack@openstack:~$ ps -ef | grep docker
root 1419 1 2 22:19 ? 00:00:55 /usr/bin/docker -d
5. Install Ubuntu to your local sandbox
sudo docker pull Ubuntucheck by
stack@openstack:~$ sudo docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a4c13d74f23a ubuntu:14.04 /bin/echo hello worl 11 minutes ago Exited (0) 11 minutes ago tender_heisenberg
6. Hello world now:
stack@openstack:~$ sudo docker run ubuntu /bin/echo hello worldhello world
now a standard docker is running on your ubuntu 12.4
Subscribe to:
Posts (Atom)