A while ago I had to teach a Debian packaging course and a colleague prepared a Virtualbox virtual machine with vagrant (you can check a tutorial at the following link).

At one point we broke some packages and quickly restored the image to continue with the course.

In my case, since my personal machine cannot handle several virtual machines with virtualbox, I preferred to move to container technology with Docker. You can check wikipedia to learn more about docker. (broken link)

The installation guide for Debian Jessie in English can be found at the following link; and the user guide at the following link. The repository where images are hosted can be checked at this link.

  1. Install https support for the repositories:
#apt-get install apt-transport-https
  1. Remove old or lxc packages:
#apt-get purge lxc-docker*
#apt-get purge docker.io*
  1. Add the docker.io gpg key:
#apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys  58118E89F3A912897C070ADBF76221572C52609D
  1. Add the repository to sources.list.d:
vim /etc/apt/sources.list.d/docker.list

deb https://apt.dockerproject.org/repo debian-jessie main
  1. Update the repository list:
#apt-get update
  1. Verify that the package is downloaded from the correct repository:
#apt-cache policy docker-engine
  1. Install docker:
#apt-get install docker-engine
  1. Start the docker daemon:
#service docker start
  1. Verify that it was installed correctly:
# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b901d36b6f2f: Pull complete
0a6ba66e537a: Pull complete
Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
Status: Downloaded newer image for hello-world:latest

Hello from Docker.
This message shows that your installation appears to be working correctly.
  1. Give non-root users access to docker:

9.1 Add the docker group if it does not exist:

$sudo groupadd docker

9.2 Add the user to the docker group:

$ sudo gpasswd -a ${USER} docker

9.3 Restart the docker daemon:

$sudo service docker restart

In upcoming articles I will show how to use docker, how to create images and, finally, an environment for packaging for Debian will be created. I will leave the references here to use them in the future:

  1. Installing docker on Debian.
  2. Packaging with docker.
  3. Docker intro and installation.
  4. Docker image building.
  5. Docker Advanced volumes.
  6. Debian/Ubuntu Package Developing with Docker.
  7. Debian/Ubuntu Package Developing with Docker, Continued.
  8. Create docker image. (broken link)
  9. Article in Spanish about docker and how to change docker deployments.
  10. Some articles from Javier Garzas' blog:
    10.1 What is Docker? What is it used for? Explained simply
    10.2 Understanding Docker. Basic concepts: Images, Containers, Links…
    10.3 For beginners: create and run your own image in a Docker container (1/2) 10.4 For beginners: create and run your own image in a Docker container (2/2)
    10.5 What if we want to orchestrate several Docker containers? Microservices, Docker Compose, Yaml… What a mess! (1/2)
    10.6 What if we want to orchestrate several Docker containers? Microservices, Docker Compose, Yaml… What a mess! (2/2)
  11. CONTAINERIZE YOUR WEB DEVELOPMENT: HOW DOCKER IS SOLVING REAL WORLD PROBLEMS FOR WEB DEVELOPERS!
  12. Continuous Inspection in Java
  13. sonarqube docker image
  14. Jenkins docker image
  15. docker image for debian jessie
  16. AUDITING AND VULNERABILITY ANALYSIS IN DOCKER
  17. Docker for running integration tests in NodeJS
  18. Docker Explained: How to create Docker Containers running Memcached

Make a donation! If you liked the article you can make a donation with Bitcoin (BTC) using the digital wallet of your choice to the following address: 17MtNybhdkA9GV3UNS6BTwPcuhjXoPrSzV

Or by scanning the QR code from your wallet:

17MtNybhdkA9GV3UNS6BTwPcuhjXoPrSzV