Docker for debian Wheezy

Hello,

I have debian Wheezy image on my beaglebone black rev C. I wanted to install dockers on this. When i try to ‘apt-get install docker’, it will go through. if i type ‘docker’ after this, i am getting the following ‘Segmentation Fault or Critical Error encountered. Dumping core and aborting. Aborted’. Is there no support of docker for beaglebone? or is there anything i need to take care of.?

the debian package is "docker.io" and i backported this to debian 8
(jessie)... (wheezy is currently not possible)

Grab a jessie snapshot from here:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Debian_Image_Testing_Snapshots

Regards,

as a follow up, in wheezy "docker" =

https://packages.debian.org/wheezy/docker

System tray for KDE3/GNOME2 docklet applications

Docker is a docking application (WindowMaker dock app) which acts as a
system tray for any desktop environment, allowing you to have a system tray
without running the KDE/GNOME panel Docker was designed to work with
Openbox 2, but it should work fine in any window manager.
Regards,

No idea what docker is, and do not care. But . . . many applications that do not check to user type in Linux will fail with “segmentation fault . . .” if they require elevated permissions, and non are given.

So . . . in other words. Run your command with sudo. This is not a guaranteed fix, but at least worth checking.

I tried all the commands when i was logged in as root.

I tried as mentioned in the website. I was able to install docker but not ‘docker.io’.

"
root@beaglebone:~# apt-get install docker.io
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package docker.io
E: Couldn’t find any package by regex ‘docker.io
"
Is there anything else i am missing? i have also updated to latest stable kernel which is "Linux beaglebone 3.8.13-bone79 #1 SMP Tue Oct 13 20:44:55 UTC 2015 armv7l GNU/Linux
"

After installing docker through “apt-get install docker”

"
root@beaglebone:~# docker
Segmentation Fault or Critical Error encountered. Dumping core and aborting.
Aborted

"

"docker.io" is NOT available in wheezy..

It is available in "jessie" because i back-ported the package from "stretch"

See my previous email, on what image you need to install to use "docker.io
"...

Regards,

ok…

Thanks a lot!!

I will try installing “jessie”.

isn’t docker.io a Nodejs package ? Maybe I’m missing something here but I would NOT expect a Nodejs package to install through APT . . . that’s what NPM is for.

it's based on google's 'go'

https://packages.debian.org/source/stretch/docker.io

Regards,

Actually, I wouldn't do this.

If a program is badly written to the point that it segfaults because of
a lack of permissions I wouldn't trust it with root permissions where
all of its bugs can be exploited to become security vulnerabilities with
maximum damage.

Actually, I wouldn’t do this.

I totally would, because it’s a test, not a production environment.

If a program is badly written to the point that it segfaults because of
a lack of permissions I wouldn’t trust it with root permissions where
all of its bugs can be exploited to become security vulnerabilities with
maximum damage.

This is standard behavior when you’re trying to run a program that attempts to use a device that requires elevated permissions to use(but doesn’t currently have). For example, if you run the test applications for any of the PRU examples, and you do not run these with root permissions, they will seg fault.

However, once something like this is found, by way of testing, or whatever. This is really easy to fix by adding 2 lines of code, or 3 lines if you require the executable to print out why it failed. You can also setup a udev rule / policy that allows a regular user to be part of a group, or otherwise have access to this asset. I think that ideally, really, both of these situations would be preferred. App permission check, and some form of GUID access for the user in question( non root ).

I installed “jessie” and it works like a charm :slight_smile: thank you :slight_smile:

Let us know if you have any issues. It's an older release (1.6.x), we might
be able to get 1.7.x to build on jessie if need be.. (1.8.x is a bigger
mess of dependicies)

Regards,

Hello Robert,

Sorry to again ask you!

I had downloaded the latest jessie image from beaglebone black website, I could install “docker.io” and i could also create a docker. That was when i replied yesterday, but after that when i try to run, i am getting the following error,
"

Error response from daemon: Cannot restart container 0548bc393d8a: [8] System error: exec format error
FATA[0001] Error: failed to restart one or more containers
"
I also tried the snapshot image (BBB-eMMC-flasher-debian-8.2-lxqt-4gb-armhf-2016-01-10-4gb.img) from the link you had provided, it failed at apt-get update by throwing an error at “dpkg/lib/info/format”. So i had to switch back to the image that i downloaded from beaglebone website.

For the docker, is there anything i should take care of?
Note: The jessie-backport line was commented in /etc/apt/sources.list and i enabled that line. Run an update and then tried to restart the docker, but failed. It threw the same error.

I've just been testing with:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Debian_Image_Testing_Snapshots

bone-debian-8.2-lxqt-4gb-armhf-2016-01-10-4gb.img.xz

What does your docker setup look like?

sudo docker info

debian@beaglebone:~$ sudo docker info
Containers: 0
Images: 0
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 0
Dirperm1 Supported: true
Execution Driver: native-0.2
Kernel Version: 4.1.15-ti-rt-r40
Operating System: Debian GNU/Linux 8 (jessie)
CPUs: 1
Total Memory: 488.2 MiB
Name: beaglebone
ID: ZNTV:6JZE:ZDCY:64WN:L225:YJDR:QWF3:OXVB:TZRE:W433:MEVR:4WA6

are you running a public container?

it's "armhf" right???

Regards,

The problem i faced with the link that you provided which is http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Debian_Image_Testing_Snapshots
and the image bone-debian-8.2-lxqt-4gb-armhf-2016-01-10-4gb.img.xz
is that when i try to “apt-get update” or “apt-get install” i was getting an error like,
"
dpkg: error: corrupt info database format file ‘/var/lib/dpkg/info/format’
E: Sub-process /usr/bin/dpkg returned an error code (2)

"

So I have been using http://beagleboard.org/latest-images
Debian 8.2 (BeagleBone, BeagleBone Black, Seeed BeagleBone Green, Arrow BeagleBone Black Industrial - 2GB SD) 2015-11-12

and the docker info is as follows.

root@beaglebone:/etc/apt# docker -v
Docker version 1.6.2, build 7c8fca2
root@beaglebone:/etc/apt# docker info
Containers: 1
Images: 2
Storage Driver: devicemapper
Pool Name: docker-179:2-1659-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 462.4 MB
Data Space Total: 107.4 GB
Data Space Available: 1.972 GB
Metadata Space Used: 897 kB
Metadata Space Total: 2.147 GB
Metadata Space Available: 1.972 GB
Udev Sync Supported: true
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.90 (2014-09-01)
Execution Driver: native-0.2
Kernel Version: 4.1.12-ti-r29
Operating System: Debian GNU/Linux 8 (jessie)
CPUs: 1
Total Memory: 488.8 MiB
Name: beaglebone
ID: RXXL:IQPN:ONKC:NVDZ:MN7P:RG4V:4AN2:DYBI:INYP:5Q6G:BPHH:5GL3
WARNING: No swap limit support

This is sources.list
"

deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
#deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free

deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
#deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-free
#deb-src http://security.debian.org/ jessie/updates main contrib non-free

deb http://ftp.debian.org/debian jessie-backports main contrib non-free
##deb-src http://ftp.debian.org/debian jessie-backports main contrib non-free

#Kernel source (repos.rcn-ee.com) : https://github.com/RobertCNelson/linux-stable-rcn-ee

The problem i faced with the link that you provided which is
Beagleboard:BeagleBoneBlack Debian - eLinux.org
<Redirect Notice;
and the image bone-debian-8.2-lxqt-4gb-armhf-2016-01-10-4gb.img.xz
is that when i try to "apt-get update" or "apt-get install" i was getting
an error like,
"
dpkg: error: corrupt info database format file '/var/lib/dpkg/info/format'
E: Sub-process /usr/bin/dpkg returned an error code (2)
"

This sounds like your ran out of space, probally didn't run:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Expanding_File_System_Partition_On_A_microSD

So I have been using Latest Software Images - BeagleBoard
Debian 8.2 (BeagleBone, BeagleBone Black, Seeed BeagleBone Green, Arrow
BeagleBone Black Industrial - 2GB SD) 2015-11-12
<http://builds.beagleboard.org/images/master/08132bf0d0cb284d1148c5d329fe3c8e1aaee44d/bone-debian-8.2-tester-2gb-armhf-2015-11-12-2gb.img.xz&gt;

and the docker info is as follows.

root@beaglebone:/etc/apt# docker -v
Docker version 1.6.2, build 7c8fca2
root@beaglebone:/etc/apt# docker info
Containers: 1
Images: 2
Storage Driver: devicemapper
Pool Name: docker-179:2-1659-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 462.4 MB
Data Space Total: 107.4 GB
Data Space Available: 1.972 GB
Metadata Space Used: 897 kB
Metadata Space Total: 2.147 GB
Metadata Space Available: 1.972 GB
Udev Sync Supported: true
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.90 (2014-09-01)
Execution Driver: native-0.2
Kernel Version: 4.1.12-ti-r29

That was before i enabled all the recommended docker.io kernel config
options..

sudo apt-get update
sudo apt-get install linux-image-4.1.15-ti-r40
sudo reboot

should get you going..

Regards,

After update and reboot.

"

root@beaglebone:~# docker version
Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.3.3
Git commit (client): 7c8fca2
OS/Arch (client): linux/arm
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.3.3
Git commit (server): 7c8fca2
OS/Arch (server): linux/arm

root@beaglebone:~# docker run -it debian /bin/bash
FATA[0001] Error response from daemon: Cannot start container 36a21eb81eca27ea2bb14cb8d5bdf08b53a680079c9dfede673257366f4f244e: [8] System error: exec format error

root@beaglebone:~# docker info
Containers: 1
Images: 2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 4
Dirperm1 Supported: true
Execution Driver: native-0.2
Kernel Version: 4.1.15-ti-r40
Operating System: Debian GNU/Linux 8 (jessie)
CPUs: 1
Total Memory: 488.7 MiB
Name: beaglebone
ID: RXXL:IQPN:ONKC:NVDZ:MN7P:RG4V:4AN2:DYBI:INYP:5Q6G:BPHH:5GL3

root@beaglebone:~# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
36a21eb81eca debian:latest “/bin/bash” 14 seconds ago determined_hypatia

root@beaglebone:~# docker restart 36a21eb81eca
Error response from daemon: Cannot restart container 36a21eb81eca: [8] System error: exec format error
FATA[0002] Error: failed to restart one or more containers

root@beaglebone:~#
"
Still the same error.

Got it!!

Instead of “docker run -it debian /bin/bash”, which is for 64bit intel processor, we have to “docker run -it armhf/debian /bin/bash” and it works!!!
It was a silly mistake and it took time to figure out.

Thanks for all the support till now :slight_smile:

Regards
Abhishek Gurudutt