Plugin Docker

  • Hi folks !


    I'm new in this community and I'm impressed by the quality of your work ! Thanks a lot, Because of you, my HP Gen8 g1610t is very nice !!!


    I've seen there are a lot of plugins for openmediavault but I would like to use docker because, some plugins don't exist yet, and it's more secure to run some app in a contenair. i want to keep Openmediavault as longer as I can working fine and follow to upgrade it without problem even if I have a lot of application installed.


    I've seen post about docker, and docker using as plugin system but I don't know if someone has made something or not ...
    So I try to generate a plugin docker repository then a docker/dockerUI plugin,


    The work is done, and there's lot of work to do, but for now I've a plugin to install docker repository and gpg keys. A plugin to install docker, dockerUi in a container but I still have some trouble to integrate the dockerUI in the openmediavault UI ...


    I think there is a lot of people here which can do that easy ... I'm still not familiar with openmediavault UI dev ...


    So I've tried to add a proxy pass rule in Nginx (another new thing for me, because a just know apache) to redirect one tab (liek in eXtplorer plugin) on dockerUI (port 9000) and have a menu inservice named docker, wwith a config page to set working directory for docker and may be some other things ... but I'm e newbee too on docker :P !


    So if someone ar interested by this and can help me to have a full working dockerUi plugin, tell me !


    For other, docker is working fine so if you want to test it, no problem to share it ! May be on OMV testing repository ??? (if you have one, else I can save it on Github!)


    Thanks

    • Offizieller Beitrag

    I was originally going to attempt a docker plugin but I don't know docker well enough and haven't had the time. I can definitely help with your plugin and we can put it in the testing repo once it is working. Can you put the code on github or somewhere else accessible? I will also have you added to the developer forum.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thank you for your answer !


    First, you need install the OMV-extras plugin : http://omv-extras.org/debian/p…omvextrasorg_1.17_all.deb


    After that, you have to install kernel-3.16 and restart you OMV server.


    Here my repository github for docker repository : https://github.com/slobberbone/openmediavault-docker-repo
    Then my repository github for docker plugin : https://github.com/slobberbone/openmediavault-docker


    Here deb files : https://drive.google.com/folde…B6ckNHRzBMNjA&usp=sharing


    Be carefull because for now, if you install the docker plugin (no problem for docker-repo), docker works, dockerUI works too, but 2 config files in /etc/nginx/openmediavault-webgui/.../openmediavault-docker-site.conf and /etc/php5/fpm/pool.d/openmediavault-docker-site.conf breaks nginx and php5-fpm config, so after OMV webgui is not reachable anymore until you rename or remove these 2 files (.conf_not_use for example) then restart nginx and php5-fbm.


    The idea is to have something similar to eXtplorer, one tab redirect on dockerUI and another one for configuration. I read, keep docker repo in source.list could be a problem in the futur, so I'll update postinst to disable it after docker installation.

  • Once the docker plugin worging fine and fully integrated to OMV, each new plugin (docker-plugin) could redirect the port from the contener to nginx with proxy pass !? Then we could be able to have/keep the actual plugin process to embedded a docker repository ...

    • Offizieller Beitrag

    First, you need install the OMV-extras plugin


    I think I have that installed since I wrote it and the extplorer plugin :D


    I can also add the repo to omv-extras so we don't need another plugin just to add the repo. I will try the plugin tonight.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!


  • I think I have that installed since I wrote it and the extplorer plugin :D


    I can also add the repo to omv-extras so we don't need another plugin just to add the repo. I will try the plugin tonight.


    So you're my mentor :D ! Thanks a lot for your work !!!
    As you want ofr add the repo ... let me know if you have problem !

    • Offizieller Beitrag

    I forked the plugin into the omv github - you have permissions to change it there too. Made a few changes. Not sure if the proxy pass is working because I don't think docker is working right.


    Just a few notes:
    - Reinstallation of plugin doesn't work without removing dockerui docker
    - docker doesn't autostart after reboot, maybe a function of dockerui?
    - omv-extras with docker repos is in repo and ready

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thanks for the possibility to push on OMV repository.


    I've juste update code source and try to generate a .deb with your changes. Normaly docker was started after installation .... I think, may be because I said you to add the repository only, that you've made in OMV-extra package, but there also dependencies ... I'll check that.


    Did you do something to display dockerUI in OMV webgui ?

  • It's just a warning ... so it would be not important for the next ...


    I have a docker plugin for omv-extra working fine now, I've just a problem for redirect nasip/dockerui/ to naspi:9200/ ...
    It was ok at one time, but, I had problem after that in dockerui, when it call json, withou 9200 port ... so error 500 ...


    If a Nginx expert pass here it would be helpful ;)


    I commit my changes to have a working plugin, just the gui not reachabe from OMV wbegui without port ...

  • So after some tests, it's fully works !

    I've commit, then you can try this deb for test : https://drive.google.com/open?…FhRX1JoVG1WQ3M&authuser=0


    After that, I would be able to add a configuration tab to manage config of docker ...


    Then we should be able to create docker-plugin like openmediavault-docker-transmissionbt, openmediavault-docker-shaarliSQL, openmediavault-docker-teampass, openmediavault-docker-owncloud, etc ...


    first question : who to manage docker-plugin dependencies, if I remove openmediavault-docker how detect all : openmediavault-docker-transmissionbt etc ... and remove it ? or just stop it ???

    • Offizieller Beitrag

    So after some tests, it's fully works !
    first question : who to manage docker-plugin dependencies, if I remove openmediavault-docker how detect all : openmediavault-docker-transmissionbt etc ... and remove it ? or just stop it ???


    apt does all that for you. If the you install the plugin, any dependency installed with that plugin will be removed when it is uninstalled. You also can't have apt-get remove/purge in postrm. lxc-docker will be removed if the plugin installed. If the plugin didn't install it, it won't be removed. You don't want to force docker's uninstallation just be cause you are removing the plugin.


    For openmediavault-docker-transmissionbt, you would make the dependency on openmediavault-docker. Then if you remove openmediavault-docker, openmediavault-docker-transmissionbt would be removed as well.


    Is docker dependent on apparmor?


    adid, patience. There is nothing in the docker repo yet. The error should be fixed though.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    Einmal editiert, zuletzt von ryecoaaron ()

  • I've used the 1.18 of OVM-extra then check docker repository then install openmediavault-plugin and it works fine from an OMV fresh install. (I don't test with docker testing).


    Ok dpkg maange dependencies like rpm ... so it's fine.


    here the dependancies : curl, apparmor, apt-transport-https, ca-certificates, lxc-docker

  • Another point, How do you think we should manage the auto start of docker ?


    A script called in rc.d ? let the user start it manually trought DockerUI (DockerUi auto start with option : --restart=always)


    Or dockerUI always started with the option : --restart=always on docker command at the installation then let manage the start/stop manually with dockerUI, and add an option to docker to start auto after reboot/boot, docker container started before with a config in :/etc/default/docker.io which I can made in docker-plugin.


    sudo nano /etc/default/docker.io
    And change or add the following : DOCKER_OPTS="-r=true"


    This second way delegate all container docker managment to the docker plugin with dockerUI, Is it ok for you ?

  • Another point, How do you think we should manage the auto start of docker ?


    We like init scripts. ;)


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

    • Offizieller Beitrag

    The dockerui starts after reboot. So, I think everything is fine.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Give the plugin time to get better :)

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

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