Docker container images installation help

  • I pwd to see which directly i was in and ls result below

    Code
    $ nano /home/mike/docker-mosquitto/mosquitto/config/mosquitto.conf
    $ pwd
    /srv/dev-disk-by-uuid-e67cf220-d53c-4dfc-85db-41d8d6db235c/one/mike/docker-mosquitto
    $ ls  
    mosquitto
    $ ls
    mosquitto
    $    

    Ohhh, sorry to mislead you but I assumed you had your user under "/home..."

    Now I can see that you created the user on OMV and ticked the "home" button.


    No worries, just go to the folder "docker-mosquitto" with cd /srv/dev-disk-by-uuid-e67cf220-d53c-4dfc-85db-41d8d6db235c/one/mike/docker-mosquitto


    Then create the "mosquitto.conf" with:

    nano mosquitto/config/mosquitto.conf

    Copy/Paste what I told you on #38


    Now change the command of docker to:

    docker run -it --name mosquitto -p 1883:1883 -v $(pwd)/mosquitto/config:/mosquitto/config/ -v $(pwd)/mosquitto/data:/mosquitto/data/ -v $(pwd)/mosquitto/log:/mosquitto/log/ eclipse-mosquitto

  • Hi Soma

    The latest script worked , however i don't have any logs at all but the ports are registered. I installed it twice both times no logs. I checked with an app mqtt fx and and test it and it publish & subscribed to hello world. I am not 100 % sure with out the logs.

    Can you explain when you have time as to why i ended up installing onto the ssd card and not as we trying to do on /home/docker?


    Code
    <img src="https://forum.openmediavault.org/wsc/index.php?attachment/19722-screenshot-2021-05-05-at-20-24-35-png/&thumbnail=1" class="woltlabAttachment" data-attachment-id="19722" id="wcfImgAttachment0">



    I have a user name as well as pi and mike was how i logged into pi this is what i thought i was logging into my home/username in steps 20 as could not cd into /home/username., perhaps if i can install it on this directory it will work correctly.


    I really appreciated the time and effort you have put into helping.

  • The latest script worked , however i don't have any logs at all but the ports are registered. I installed it twice both times no logs. I checked with an app mqtt fx and and test it and it publish & subscribed to hello world. I am not 100 % sure with out the logs.

    The logs NOT showing in Portainer, I have no idea. Somewhow, it doesn't bind it to the console.

    Since this is not a "STACK" made to be run in Portainer, I guess it's normal.


    Nonetheless, You can see the log on the terminal (go to the folder "docker-mosquitto") and run:

    tail -f $(pwd)/mosquitto/log/mosquitto.log


    But, if it's working, that's all that matters, "me thinks" ;)


    On the other hand, I transcribed the command to a yml file. That way is easier to run it (either on Portainer or, better yet with "docker-compose" CLI):

    Create a file with nano docker-compose.yml and paste the following code (make sure that the volume paths are valid or edit to your own):

    Now, on the same folder that that file is, all you need to start/update the container is: docker-compose up -d mosquitto

    When you want to stop it: docker-compose down


    Or just open Portainer, and on the "Stack" just paste the code there and give it a name. Then Deploy

  • Hi Soma


    Thanks you for the update your patience and time in helping me. I will be looking into this and will keep you informed of the situation when i have mqtt connects to one of project. Your information has been very helpful.


    Thanks again

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!