OpenMediaVault-Plugin-Developers / openmediavault-docker-gui

Docker plugin for OpenMediaVault
32 stars 17 forks source link

Docker also runs on other architectures #22

Open K0n24d opened 8 years ago

K0n24d commented 8 years ago

Why did you limit this plugin to amd64 ? Docker is running nicely on other architectures like armhf. You only need to pay attention to which images you use (but this is also true en amd64)

https://hub.docker.com/search/?q=armhf

ryecoaaron commented 8 years ago

The repo we get our docker-engine package from does not have an armhf binary/package. Maybe this will change with omv 3.x.

nicjo814 commented 8 years ago

@K0n24d When I started working on the plugin I believe only amd64 was a supported platform for Docker (not sure though). Since I only have an amd64 platform to work on myself, and I lack the time to set up/maintain etc. other platforms right now I will not add support for this myself. If you are able to submit PR's though that would enable armhf (or other platforms) I would happily merge them into the project code.

miesgre commented 7 years ago

Is there any news about this?

I just changed the architecture line in debian/control file to all and rebuild the deb package.

I installed on my OMV3 (raspberry pi flavour) and it works great. The only issue is with the "docker images repo" tab that is loading the images from http://openmediavault-plugin-developers.github.io/openmediavault-docker-repo/dockerlist.xml and those images are for amd64 architecture.

Maybe change the code to download a dockerlist-${arch}.xml file will solve the problem.

ryecoaaron commented 7 years ago

Since all of the other maintainers are very busy, I will look into this. The dockerlist should be easy to implement. I just don't know what to populate the armhf dockerlist with.

miesgre commented 7 years ago

I view that most of the images comes from linuxserver project. I think for armhf you can use the equivalents from lsioarmhf (https://hub.docker.com/u/lsioarmhf/)

ryecoaaron commented 7 years ago

3.1.8 package in the docker testing repo. Didn't try on my RPi but it doesn't work on the xu4 image without modifying a few things. I didn't add any images to the dockerlist either.

miesgre commented 7 years ago

I installed, 3.1.8 version and it does not work for me too. I says:

Error: "Failed to connect to localhost port 42005: Connection refused" - Code: 7

The only difference with the version I installed manually is openmediavault-omvextrasorg. I modified the debian/control file to use the 3.4.23 version instead 3.4.24.

Those are the diferences I made to make it working:

diff --git a/debian/control b/debian/control
index d9dfdf6..1a92a72 100644
--- a/debian/control
+++ b/debian/control
@@ -8,11 +8,11 @@ Standards-Version: 3.9.6
 Homepage: http://omv-extras.org/

 Package: openmediavault-docker-gui
-Architecture: amd64
+Architecture: all
 Depends: docker-engine (>=1.10),
          omvextras-common,
          openmediavault (>= 3.0.67),
-         openmediavault-omvextrasorg (>= 3.4.24),
+         openmediavault-omvextrasorg (>= 3.4.23),
          php5-curl,
          php5-imagick,
          ${misc:Depends},

Do you think that the problem is with the openmediavault-omvextrasorg version difference? Or is in the new code to detect de architecture?

ryecoaaron commented 7 years ago

I'm a little confused why you didn't use omv-extras 3.4.24 since it has been released?

The architecture detection only determines which docker list to use. It doesn't affect anything else. Not sure why you can't connect to docker itself.

miesgre commented 7 years ago

I used 3.4.23 because it is the version I had installed. But since I tested the openmediavault-docker-gui 3.1.8, my OMV is inestable. I have a lot of errors like:

Invalid RPC response. Please check the syslog for more information.

Error #0: exception 'OMV\Rpc\Exception' with message 'Invalid RPC response. Please check the syslog for more information.' in /usr/share/php/openmediavault/rpc/rpc.inc:186 Stack trace: #0 /usr/share/php/openmediavault/rpc/proxy/json.inc(95): OMV\Rpc\Rpc::call('System', 'getInformation', Array, Array, 3) #1 /var/www/openmediavault/rpc.php(45): OMV\Rpc\Proxy\Json->handle() #2 {main}

I'm going to reinstall a fresh OMV and test it again.

ryecoaaron commented 7 years ago

The code changes in the latest docker and omv-extras plugins should not have made your system unstable. Lots of testing could have though. A fresh install should help.

miesgre commented 7 years ago

I installed a fresh OMV3 for my rpi, and updated all packages.

Now I have the problem that docker-engine is not available. I don't know why, last time I installed it normally.

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openmediavault-docker-gui : Depends: docker-engine (>= 1.10) but it is not installable
E: Unable to correct problems, you have held broken packages.

I followed the instructions from https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/ to install docker

curl -sSL https://get.docker.com | sh

Then I installed openmediavault-docker-gui normally and I have the docker service in OMV

Client:
 Version:      17.03.0-ce
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   60ccb22
 Built:        Thu Feb 23 11:32:23 2017
 OS/Arch:      linux/arm

Server:
 Version:      17.03.0-ce
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   60ccb22
 Built:        Thu Feb 23 11:32:23 2017
 OS/Arch:      linux/arm
 Experimental: false

But, if I go to the "docker images repo" tab, I view the images from amd64 arch.

ryecoaaron commented 7 years ago

Did you enable both docker repos in omv-extras? When you install things from the command line, it makes it harder to fix the plugin. I forgot to plug my RPi in. I will do that later tonight.

The docker images repo problem shouldn't be hard to fix.

miesgre commented 7 years ago

Yes, the problem is that the docker-engine package is not available.

Now, I have this repo added to my apt:

deb [arch=armhf] https://apt.dockerproject.org/repo raspbian-jessie main

Maybe the solution is add this repository??

ryecoaaron commented 7 years ago

Can't really check much until my RPi is on. What is the output of: apt-cache policy docker-engine

miesgre commented 7 years ago
root@raspberrypi:/etc/apt/sources.list.d# apt-cache policy docker-engine
docker-engine:
  Installed: 17.03.0~ce-0~raspbian-jessie
  Candidate: 17.03.0~ce-0~raspbian-jessie
  Version table:
 *** 17.03.0~ce-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
        100 /var/lib/dpkg/status
     17.03.0~ce-0~debian-jessie 0
        500 https://apt.dockerproject.org/repo/ debian-jessie/main armhf Packages
     1.13.1-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.13.1-0~debian-jessie 0
        500 https://apt.dockerproject.org/repo/ debian-jessie/main armhf Packages
     1.13.0-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.13.0-0~debian-jessie 0
        500 https://apt.dockerproject.org/repo/ debian-jessie/main armhf Packages
     1.12.6-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.12.6-0~debian-jessie 0
        500 https://apt.dockerproject.org/repo/ debian-jessie/main armhf Packages
     1.12.5-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.12.5-0~debian-jessie 0
        500 https://apt.dockerproject.org/repo/ debian-jessie/main armhf Packages
     1.12.4-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.12.4-0~debian-jessie 0
        500 https://apt.dockerproject.org/repo/ debian-jessie/main armhf Packages
     1.12.3-0~jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
        500 https://apt.dockerproject.org/repo/ debian-jessie/main armhf Packages
     1.12.2-0~jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
        500 https://apt.dockerproject.org/repo/ debian-jessie/main armhf Packages
     1.12.1-0~jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
        500 https://apt.dockerproject.org/repo/ debian-jessie/main armhf Packages
ryecoaaron commented 7 years ago

Looks like the package exists on the repo that omv-extras adds. Not sure why you couldn't install it. I will figure that out later.