PINE64
Docker, anyone?! - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook (https://forum.pine64.org/forumdisplay.php?fid=76)
+--- Forum: General Discussion on Pinebook (https://forum.pine64.org/forumdisplay.php?fid=77)
+--- Thread: Docker, anyone?! (/showthread.php?tid=4599)



Docker, anyone?! - lodger - 06-17-2017

Okay, so I'm wondering if any of you have successfully installed Docker on any of the pinebook distros? If so, could you please point out the steps you have undertaken to make it all work?! Thanks in advance! Wink


RE: Docker, anyone?! - MarkHaysHarris777 - 06-17-2017

(06-17-2017, 12:14 PM)lodger Wrote: Okay, so I'm wondering if any of you have successfully installed Docker on any of the pinebook distros? If so, could you please point out the steps you have undertaken to make it all work?! Thanks in advance! Wink

hi,  virtualization (yes, Docker) is the primary reason longsleep created the images for pine64 in the first place;  yes, it works fine.

You will need to look over the github site, read the doc, and visit longsleep's site;  do your homework, and come back with questions as you proceed.

Shy


RE: Docker, anyone?! - umiddelb - 06-18-2017

Hm, the 3.10 BSP kernel supports Docker to some extend. You shouldn't expect to run the latest bleeding edge Docker feature there, the kernel is simply too old.
For the PineBook you cannot switch to a newer mainline kernel (as you can do for the PINE64), due to the lack of decent HW support (e.g. video acceleration).


RE: Docker, anyone?! - pfeerick - 06-18-2017

(06-17-2017, 12:14 PM)lodger Wrote: Okay, so I'm wondering if any of you have successfully installed Docker on any of the pinebook distros? If so, could you please point out the steps you have undertaken to make it all work?! Thanks in advance! Wink

I can't say I've tried until now. While Marcus is right about the pine64... this is the pinebook you were asking about, not the pine64. Now, I've just installed docker via "sudo apt install docker.io". Then checked if the docker group existed, and then added myself to the group. 


Code:
sudo groupadd docker
sudo usermod -aG docker $YOUR_USER_NAME

Then logged out and back in again so that my username is now in the docker group. This means when I run something like "docker ps" that I don't get the "unable to access docker" message and don't need to use sudo every time I want to access docker.

Then, the big test. Will it run? Will it crash? Will it break? "docker run armhf/hello-world" Sucess! "Hello from Docker on armhf!" There is also an "aarch64/hello-world" you can run, which is more appropriate for the pinebook, as it is indeed a arm64 processor under the hood!

The trick you will have with pre-made docker images on the pine64/pinebook is finding ones mean to run on armhf/aarch64. But if you check out the (now depreciated) armhf and aarch64 images and the now officially preferred arm64v8, arm32v6 and arm32v7 images, you'll see there are plenty of images to start and base new stuff on.


RE: Docker, anyone?! - MarkHaysHarris777 - 06-19-2017

(06-18-2017, 07:14 PM)pfeerick Wrote:
(06-17-2017, 12:14 PM)lodger Wrote: Okay, so I'm wondering if any of you have successfully installed Docker on any of the pinebook distros? If so, could you please point out the steps you have undertaken to make it all work?! Thanks in advance! Wink

I can't say I've tried until now. While Marcus is right about the pine64... this is the pinebook you were asking about, not the pine64. 

Right;  the Docker should run on all of our images;  the only thing that will vary is whether the Docker is going to eventually require the newer kernel (mainline) and what the performance will be; Docker should be hardware independent.


RE: Docker, anyone?! - lodger - 06-20-2017

Thank you very much, pfeerick - that answers my question in full detail. Can you say what version of docker is installed after installing it from the apt sources? I think it is a rather old 1.6 release but I could be wrong.

Anyway, this is good news. Thank you all for your positive repiles.


RE: Docker, anyone?! - pfeerick - 06-21-2017

Reported version is: Docker version 1.12.6, build 78d1802

And sadly you can't use the docker install script to install the latest v17.05.0-ce as it doesn't have any aarch64 package repos.

But you might be able to grab the armhf binaries package from https://github.com/moby/moby/releases and semi-follow the linux install instructions.

I can at least report that the armhf binary runs, and reports itself as Docker version 17.05.0-ce, build 89658be if nothing else!  Big Grin  Big Grin


RE: Docker, anyone?! - cephasiii - 01-02-2018

(06-18-2017, 07:14 PM)pfeerick Wrote:
(06-17-2017, 12:14 PM)lodger Wrote: Okay, so I'm wondering if any of you have successfully installed Docker on any of the pinebook distros? If so, could you please point out the steps you have undertaken to make it all work?! Thanks in advance! Wink

I can't say I've tried until now. While Marcus is right about the pine64... this is the pinebook you were asking about, not the pine64. Now, I've just installed docker via "sudo apt install docker.io". Then checked if the docker group existed, and then added myself to the group. 


Code:
sudo groupadd docker
sudo usermod -aG docker $YOUR_USER_NAME

Then logged out and back in again so that my username is now in the docker group. This means when I run something like "docker ps" that I don't get the "unable to access docker" message and don't need to use sudo every time I want to access docker.

Then, the big test. Will it run? Will it crash? Will it break? "docker run armhf/hello-world" Sucess! "Hello from Docker on armhf!" There is also an "aarch64/hello-world" you can run, which is more appropriate for the pinebook, as it is indeed a arm64 processor under the hood!

The trick you will have with pre-made docker images on the pine64/pinebook is finding ones mean to run on armhf/aarch64. But if you check out the (now depreciated) armhf and aarch64 images and the now officially preferred arm64v8, arm32v6 and arm32v7 images, you'll see there are plenty of images to start and base new stuff on.

@pfeerick,
     great tutorial! works like a charm on my pinebook.