Docker - Bash: IP: command not found

DockerWindows 10

Docker Problem Overview


I'm currently trying to set up a hyperledger fabric network using docker toolbox, based on the guide HERE

When it comes to "Starting up validating peers" step, I followed and entered ip add into the terminal, but it returns bash: ip: command not found. Any solution? I've tried ifconfig as well and it's the same issue, command not found.

Using Docker Toolbox on Windows 10 Home

Thanks

Docker Solutions


Solution 1 - Docker

Install ip command package for Ubuntu.

apt update
apt install iproute2

Solution 2 - Docker

I have tried hostname -I. Working fine for me.No need to install a new package.

Solution 3 - Docker

Unfortunately, your link has been broken (or it might be inaccessible from Iran). Although there is not enough evidence of which Linux OS you are trying to use, a solution is provided as follow work under .deb (e.g. Ubuntu) and .rpm (e.g. Fedora) package managers.

At first, update the container's repository: Ubuntu:

apt-get update

CentOS:

yum update

Fedora:

dnf update

Secondly, install net-tools package. Ubuntu:

apt-get install net-tools

CentOS:

yum install net-tools

Fedora:

dnf install net-tools

Lately, ifconfig has been replaced with ip command. So make sure to check both commands, some Linux distributions have not changed the command yet.

Solution 4 - Docker

for command ip not found in centos 7, you can use yum install iproute -y to fix.

for command ifconfig not found in centos 7, you can use yum install net-tools -y to fix.

Solution 5 - Docker

Although OP was on Windows 10. I landed on this question searching for a fix for macOS and didn't find this answer for a while. So I'm linking it here as well just in case

You can install ip tool on OS X via brew:

brew install iproute2mac

Solution 6 - Docker

Your link doesn't work.

Do docker ps or docker images in GitBash to see if the docker containers and images are running.

I recommend installing Docker Community Edition if you are running Win 10. Make sure u have Hyper-V enabled.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionZenX0904View Question on Stackoverflow
Solution 1 - DockerprostiView Answer on Stackoverflow
Solution 2 - Dockermuhammad shahanView Answer on Stackoverflow
Solution 3 - DockerEsmaeil MIRZAEEView Answer on Stackoverflow
Solution 4 - DockerSimonSunView Answer on Stackoverflow
Solution 5 - DockerCarolusView Answer on Stackoverflow
Solution 6 - DockerGeneView Answer on Stackoverflow