openmediavault-docker-gui Testing

    • OMV 2.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Pheoxy wrote:

      activ wrote:

      Hey guys.

      I'm feeling a bit stupid at the moment, for some reason I cannot figure out how to update an image/container from the docker-gui without staring from scratch.

      Can someone please point me in the right direction?

      Thanks,
      activ
      You need to stop container and pull again is the easiest way.

      Source Code

      1. docker stop container
      2. 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:

      Source Code

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

      I even tried to change the port:


      Source Code

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

      Source Code

      1. Restarting (0) Less than a second ago

      all the time. But running container on OMV shell with

      Source Code

      1. docker run -t -i ubuntu:trusty

      all is fine. Syslog contains

      Source Code

      1. 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?
    • nicjo814 wrote:

      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


      Source Code

      1. 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

      Source Code

      1. docker run -d ubuntu:trusty /sbin/init
      2. 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.