openmediavault-docker-gui Testing

  • You need to stop container and pull again is the easiest way.

    Code
    docker stop container
    docker pull image/image


    Thanks, that almost did it. After pulling the new version the container kept using the old version.
    I modified the container (changing nothing, just clicking modify then save) and then it started using the latest version.

  • I have a brand new OMV installation (2.2.13).
    When I install docker and activate it, I get this error:


    I even tried to change the port:



    Code
    Fehler #0:
    exception 'OMVModuleDockerException' with message 'Error: "couldn't connect to host" - Code: 7' in /usr/share/omvdocker/Utils.php:63
    Stack trace:
    #0 /usr/share/omvdocker/Utils.php(125): OMVModuleDockerUtil::doApiCall('http://localhos...')
    #1 /usr/share/openmediavault/engined/rpc/docker.inc(145): OMVModuleDockerUtil::getImages('12345', true)
    #2 [internal function]: OMVRpcServiceDocker->getImages(Array, Array)
    #3 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
    #4 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('getImages', Array, Array)
    #5 /usr/sbin/omv-engined(500): OMVRpc::exec('Docker', 'getImages', Array, Array, 1)
    #6 {main}

    New omv ystem. Docker is the first plugin I installed. It can reproduce the problem with another new installation.
    It's a VM on Hyper-V Server 2016.

  • could you try to manually restart the docker service via cli with the command "service docker restart"? then run this command and check if any error is returned "docker ps -a". it looks like the docker service is not running properly... if you get the service running, try changing the port in the gui and see if it works then.

  • It's not possible to start docker.


    service start docker
    -> starting docker: docker
    docker ps -a
    -> Cannot connect to the Docker daemon. Is the docker daemon running on this host?


    Edit: Docker.log says, that my Kernel 3.2.0-4amd64 is not supported.
    i will try again with backports.


    Edit2: Works! :thumbup:

  • Hello,


    just got this error randomly. I had to restart docker service from commandline. I can click OK and everything works as intended, just wanted to inform



    Error

    Object of class stdClass could not be converted to string
    OKShow details
    Error

    Object of class stdClass could not be converted to string
    Error #0:exception 'ErrorException' with message 'Object of class stdClass could not be converted to string' in /usr/share/openmediavault/engined/rpc/docker.inc:1461Stack trace:#0 /usr/share/openmediavault/engined/rpc/docker.inc(1461): errorHandler(4096, 'Object of class...', '/usr/share/open...', 1461, Array)#1 [internal function]: OMVRpcServiceDocker->getDockerRepo(Array, Array)#2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)#3 /usr/share/php/openmediavault/rpc/rpc.inc(84): OMV\Rpc\ServiceAbstract->callMethod('getDockerRepo', Array, Array)#4 /usr/sbin/omv-engined(516): OMV\Rpc\Rpc::call('Docker', 'getDockerRepo', Array, Array, 1)#5 {main}

  • I've latest OMV3 and docker-testing plugin from OMV-Extras installed. When pulling simple ubuntu:trusty image and running this container, there is an error. GUI prints only


    Code
    Restarting (0) Less than a second ago


    all the time. But running container on OMV shell with


    Code
    docker run -t -i ubuntu:trusty


    all is fine. Syslog contains


    Code
    Dec 14 20:13:01 omv-dev docker[1090]: time="2016-12-14T20:13:01.999562243+01:00" level=error msg="containerd: notify OOM events" error="cgroup path for memory not found"


    What's the reason for this? And may this error in syslog causes Docker GUI to fail starting this container?

  • The plug-in runs the container demonized which I think it's not possible with the container you are trying to run. The plug-in is mainly intended for running docker apps as "services".

    You are right. I'm new to Docker, but I'm learning a lot now. Cgroup errors in syslog disappeared with help of this manual.
    And yes, you are right. Running container on shell with "docker run ubuntu:trusty" exits immediately, only "docker run -t -i ubuntu:trusty" keeps a shell opened. Using "/sbin/init" as CMD instead of default "/bin/bash" keeps the container running. But why does "/bin/bash" does not work? Is it because it will open a shell on a TTY that does not exist?

  • Ok, I think I understand the core concept and what to do to get a container running in GUI.


    @nicjo814 One thing I am missing is: when modifying an existing container, one cannot modify the value of CMD. Some 3rd party containers have a default CMD which does not work with daemon mode (see my last post and "/bin/bash"). But to prevent rebuilding this image a simple solution could be to modify the CMD value as one can do with "docker run [...]". Are you going to implement this?

  • The popup in GUI provides no field where I can type in a different CMD. The CMD in docker command has to be the last option on CLI. So it has to be "docker run -d [...] [CMD]"
    The field "Extra args" in GUI prepends the input value to the container name, like



    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; docker run -d --restart=always -v /etc/localtime:/etc/localtime:ro --net=bridge -h "40af611f3e5a" -e PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" --name="elegant_varahamihira" /sbin/init "ubuntu:trusty" 2>&1' with exit code '125': docker: Error parsing reference: "/sbin/init" is not a valid repository/tag. See 'docker run --help'.

    As you can see it puts "/sbin/init" before "ubuntu:trusty", so I think there has to be a special input field in GUI for managing this.

  • Sorry, I probably wasn't too precise in my last post. Could you try to get the image up via cli using the command "docker run -d ubuntu:trusty" and whichever other parameters are needed (except -i and -t, since they are not used by the GUI). I'm trying to figure out if it's possible at all to run the image you are using in detached mode (which is the -d flag in the docker run command used by the plugin).

  • Ok. I get it to work in detached mode with


    Code
    docker run -d ubuntu:trusty /sbin/init
    docker run -d ubuntu:trusty ping localhost

    Normally there should be no other app in container than the one specified by CMD. *If* a CMD is specified, there can also be containers without any declaration of CMD. Also, when using ENTRYPOINT instead of CMD one could pass CLI arguments to executed script inside container and that's the same syntax as additional arguments for entrypoint have to be passed after the container name.

Jetzt mitmachen!

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