

Using docker consists of passing it a chain of options and subcommands followed by arguments. With Docker installed and working, now’s the time to become familiar with the command line utility. If you choose not to, please prepend the commands with sudo. The rest of this article assumes you are running the docker command as a user in the docker user group. If you need to add a user to the docker group that you’re not logged in as, declare that username explicitly using:

You will need to log out of the Droplet and back in as the same user to enable this change. If you want to avoid typing sudo whenever you run the docker command, add your username to the docker group: Is the docker daemon running on this host?. Outputdocker: Cannot connect to the Docker daemon. The output should be similar to the following, showing that the service is active and running: It will add the official Docker repository, download the latest version of Docker, and install it:Īfter installation has completed, start the Docker daemon: This section shows you how to do just that.īut first, let’s update the package database: To get the latest and greatest version, install Docker from the official Docker repository. The Docker installation package available in the official CentOS 7 repository may not be the latest version. Initial Setup Guide for CentOS 7 explains how to add users and give them sudo access. If root access is required for the command, it will be preceded by sudo. The default 64-bit CentOS 7 Droplet meets these requirements.Īll the commands in this tutorial should be run as a non-root user. You can verify this by looking at the running kernel with uname -aĪnd the installed sources at ls /usr/src/kernelsĪs a final conclusion, whatever happens, look at the messages and log files provided.Note: Docker requires a 64-bit version of CentOS 7 as well as a kernel version equal to or greater than 3.10. So, running kernel and installed kernel sources (aka kernel-devel) must match. After installing the proper kernel-devel package, building and then installing worked as expected. Now it complained about missing header files and suggested to do yum install kernel-devel-2.6.86_64Īs you can see, this is a slightly different version, 504.16.2 vs just 504. Since kernel-devel and sources at /usr/src/kernels/2.6.32-504.16.2.el6.x86_64 were already installed, I was confused, but called it with the requested environment variable KERN_DIR=/usr/src/kernels/2.6.32-504.16.2.el6.x86_64 sh /media/cdrom/n There it said something about missing kernel sources and to provide the kernel source directory with e.g. In my case, one of them asked to look into /var/log/vboxadd-install.log. If it doesn't work for you, look at the messages. Answer almost worked, but it failed building some kernel modules.
