October-20th-2020, 08:00 AM (This post was last modified: October-20th-2020, 08:00 AM by Armin@netPI.)
It seems to me that you have loaded the container hilschernetpi/netpi-raspbian into netPI and logged in using putty. Am I right?
In this case I have to tell you that you are using a Linux console application running in netpi-raspbian container ... and in a container you will never ever have access to Docker "docker ..." commands. This would be using "Docker in Docker" which is not possible on netPI device.
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)
October-20th-2020, 08:20 AM (This post was last modified: November-2nd-2020, 07:59 AM by Armin@netPI.)
The only possibility to access Docker functions and to start a container on netPI is using its Docker web UI. Using Docker commands in a shell is not possible at all and was never intended from the beginning. netPI is a secured device with no ssh service active and this is why there is no shell. You could run of course a shell in a container ... but this is nevertheless no shell that gives you access to the host Linux.
I agree that the web page https://hub.docker.com/_/eclipse-mosquitto describes the "docker ..." commands of course, but this is for standard Linux shells that are not running in a container. In 99.99% this is the standard use case this is fine ... but not for netPI.
So what you must do is to "translate" the described command line
Code:
docker run -it -p 1883:1883 -p 9001:9001 -v mosquitto.conf:/mosquitto/config/mosquitto.conf eclipse-mosquitto
into netPI Docker web UI compliant container deployment parameter set like the following picture shows
For a simple and ease use I avoided to configure the volume mapping "mosquitto.conf:/mosquitto/config/mosquitto.conf" in my screen shot. It is not needed.
Press "Deploy container" and you will see mosquitto running with charm.
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)