Fixed: Docker error «docker: 'network' is not a docker command.»

When i was trying to create a new network interface for docker , it was throwing following error

1 2 3 4   root@test.com~]# docker network create mynetwork docker: ‘network’ is not a docker command.  

Reason

Docker network feature was introduced in 1.9 release. Make sure your docker version is 1.9 or above.

How to upgrade Docker on Centos7?

The Docker installation package available in the official CentOS 7 repository may not be the latest version. To get the the latest Docker version, install it from docker official repo.

On Centos7 , Use following command to download and install Docker from official repo

1 2 3   curl fsSL https://get.docker.com/ | sh  

Once installation has completed, start the Docker daemon:

1 2 3   sudo systemctl start docker  

Verify docker is running

1 2 3   systemctl status docker  

Enable the service to start on reboot

1 2 3   systemctl enable docker  

 

Author: , 0000-00-00