Docker on Debian

$ sudo nano /etc/apt/sources.list.d/backports.list

 

add

deb http://http.debian.net/debian wheezy-backports main
deb https://apt.dockerproject.org/repo debian-jessie main

 

purge old

$ apt-get purge lxc-docker*
$ apt-get purge docker.io*

 

Update package information, ensure that APT works with the https method, and that CA certificates are installed.

$ apt-get update
$ apt-get install apt-transport-https ca-certificates

 

Add the new GPG key.


$ apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

 

Install docker


$ apt-cache policy docker-engine
$ sudo apt-get update
$ sudo apt-get install docker-engine
$ sudo service docker start

$ sudo docker version

Client:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:23:39 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:23:39 2016
 OS/Arch:      linux/amd64

$ ifconfig
docker0   Link encap:Ethernet  HWaddr 02:42:50:cd:e9:5f  
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 08:00:27:52:05:ab  
          inet addr:10.42.0.95  Bcast:10.42.0.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe52:5ab/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:31760 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17745 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:43867577 (41.8 MiB)  TX bytes:1493566 (1.4 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:480 (480.0 B)  TX bytes:480 (480.0 B)

$ sudo docker image

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

$ sudo docker search dockerizedrupal/php-5.6
NAME                      DESCRIPTION      STARS     OFFICIAL   AUTOMATED
dockerizedrupal/php-5.6   docker-php-5.6   2                    [OK]
$ sudo docker pull dockerizedrupal/php-5.6

Screenshot at 2016-06-03 15:22:24

$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
dockerizedrupal/php-5.6 latest 75a45307d2af 2 weeks ago 877.1 MB
$ sudo docker run -i dockerizedrupal/php-5.6

 

uninstall

$ sudo apt-get purge docker-engine
$ sudo apt-get autoremove
$ rm -rf /var/lib/docker

https://docs.docker.com/engine/installation/linux/debian/#debian-jessie-80-64-bit

for ubuntu
https://docs.docker.com/engine/installation/linux/ubuntulinux/

Advertisements

About NanoSoftTech

NanoSoftTech
This entry was posted in Debian. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s