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.
- Install https support for the repositories:
#apt-get install apt-transport-https
- Remove old or lxc packages:
#apt-get purge lxc-docker*
#apt-get purge docker.io*
- Add the docker.io gpg key:
#apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
- Add the repository to
sources.list.d:
vim /etc/apt/sources.list.d/docker.list
deb https://apt.dockerproject.org/repo debian-jessie main
- Update the repository list:
#apt-get update
- Verify that the package is downloaded from the correct repository:
#apt-cache policy docker-engine
- Install docker:
#apt-get install docker-engine
- Start the docker daemon:
#service docker start
- 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.
- 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:
- Installing docker on Debian.
- Packaging with docker.
- Docker intro and installation.
- Docker image building.
- Docker Advanced volumes.
- Debian/Ubuntu Package Developing with Docker.
- Debian/Ubuntu Package Developing with Docker, Continued.
- Create docker image. (broken link)
- Article in Spanish about docker and how to change docker deployments.
- 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) - CONTAINERIZE YOUR WEB DEVELOPMENT: HOW DOCKER IS SOLVING REAL WORLD PROBLEMS FOR WEB DEVELOPERS!
- Continuous Inspection in Java
- sonarqube docker image
- Jenkins docker image
- docker image for debian jessie
- AUDITING AND VULNERABILITY ANALYSIS IN DOCKER
- Docker for running integration tests in NodeJS
- 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:
