


It in a container, print a “Hello from Docker” message and exit: docker container run hello-world To verify Docker is installed successfully and that you can run docker commands without sudo, issue the following command which will download a test image, run Log out and log back in so that the group membership is refreshed. You can do that by typing: sudo usermod -aG docker $USER Which is created during the installation of the Docker CE package. You need to add your user to the docker group

If you want to run Docker commands as a non-root user without prepending sudo └─2498 docker-containerd -config /var/run/docker/containerd/containerd.tomlĪt the time of writing, the current stable version of Docker is, 18.06.1, to print the Docker version type: docker -v Docker version 18.06.1-ce, build e68fc7aĮxecuting the Docker Command Without Sudo #īy default, managing Docker requires administrator privileges. Loaded: loaded (/usr/lib/systemd/system/rvice enabled vendor preset: disabled)Īctive: active (running) since Wed 08:51:20 UTC 7s ago

To install Docker on your CentOS 7 server follow the steps below: The recommended approach is to install Docker from the Docker’s repositories. You check this guideĪlthough the Docker package is available in the official CentOS 7 repository, it may not always be the latest version.
