Docker base image for Arch ARM

This forum is for discussion about general software issues.

Re: Docker base image for Arch ARM

Postby manchoz » Mon Oct 26, 2015 11:16 am

Hi,
I'm not able to reproduce your connectivity problems: could you explain better what are you trying to do and what kind of networking is not working?

I have docker 1:1.7.1-2 from standard Arch ARM repos both on a Cubieboard2 and on C1 ARM server(s) on Scaleway. I'm able to ping/pacman/apt-get on any number of containers running in parallel. Images are built with mkimage-arch.sh from my docker repo or pulled from docker registry (i.e. hypriot/rpi-* ubuntu/debian-based images).
manchoz
 
Posts: 5
Joined: Fri Sep 25, 2015 9:44 am

Re: Docker base image for Arch ARM

Postby alexellis » Mon Oct 26, 2015 12:22 pm

Fresh reboot

Build base arch image (with mkimage-arch.sh) and tag it as basepi

Can't ping 8.8.8.8, can't ping local router.

$this->bbcode_second_pass_quote('', '[')root@0cc08e37381e /]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default gateway 0.0.0.0 UG 0 0 0 eth0
172.17.0.0 * 255.255.0.0 U 0 0 0 eth0


Nothing obvious listed in the log from journalctl _COMM=docker

Running the same in the ubuntu armhf container gives the same result - exception ping is not installed so I typed in apt-get update and the mirror server can't be reached.

Now I've uninstalled and completely wiped out /var/lib/docker and installed fresh... it can't even start a container with the package in the Alarm repo but native.cgroupdriver=cgroupfs is mentioned as a command line option which fixes this.

$this->bbcode_second_pass_quote('', '[')user1@dockerexample ~]$ sudo pacman -S docker
resolving dependencies...
looking for conflicting packages...

Packages (1) docker-1:1.7.1-2

Total Installed Size: 15.22 MiB

:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring [#######################################################] 100%
(1/1) checking package integrity [#######################################################] 100%
(1/1) loading package files [#######################################################] 100%
(1/1) checking for file conflicts [#######################################################] 100%
(1/1) checking available disk space [#######################################################] 100%
(1/1) installing docker [#######################################################] 100%
Optional dependencies for docker
btrfs-progs: btrfs backend support [installed]
lxc: lxc backend support [installed]
[user1@dockerexample ~]$ sudo systemctl start docker
[user1@dockerexample ~]$ sudo systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[user1@dockerexample ~]$ 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
Logging Driver: json-file
Kernel Version: 4.1.11-1-ARCH
Operating System: Arch Linux ARM (containerized)
CPUs: 4
Total Memory: 923.1 MiB
Name: dockerexample
ID: PHOV:TXBF:YD3Y:NBRW:ZSUH:G4K3:KHIP:XIKP:GIO7:O54S:LDLK:YBI6
WARNING: No memory limit support
WARNING: No swap limit support
[user1@dockerexample ~]$ docker pull armv7/armhf-ubuntu
latest: Pulling from armv7/armhf-ubuntu
a7e4f6f0de09: Pull complete
c44dda190792: Pull complete
5bf802ecb04e: Pull complete
8dcbb0d736db: Pull complete
0f9416e8ca9b: Pull complete
Digest: sha256:e840b64ab2a0aa13617a245079bd2d2495da00263514e0b973957e4bfca098cc
Status: Downloaded newer image for armv7/armhf-ubuntu:latest
[user1@dockerexample ~]$ sudo docker run -ti armv7/armhf-ubuntu /bin/bash
Error response from daemon: Cannot start container 48d03211c6a7c2189726e8abb831669ac1f33da78ffa2f88c50cf7be483669df: [8] System error: open /sys/fs/cgroup/cpu,cpuacct/init.scope/system.slice/docker-48d03211c6a7c2189726e8abb831669ac1f33da78ffa2f88c50cf7be483669df.scope/cpu.shares: no such file or directory



Add parameters to /usr/lib/systemd/system/docker.service

$this->bbcode_second_pass_quote('', '
')[Service]
ExecStart=/usr/bin/docker -d --exec-opt native.cgroupdriver=cgroupfs -H fd://


Now we can start containers but again we have no internet access...

$this->bbcode_second_pass_quote('', '
')[user1@dockerexample ~]$ sudo nano /usr/lib/systemd/system/docker.service
[user1@dockerexample ~]$ sudo systemctl restart docker
Warning: docker.service changed on disk. Run 'systemctl daemon-reload' to reload units.
[user1@dockerexample ~]$ sudo systemctl daemon-reload
[user1@dockerexample ~]$ sudo systemctl restart docker
[user1@dockerexample ~]$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
armv7/armhf-ubuntu latest 0f9416e8ca9b 3 days ago 130.5 MB
[user1@dockerexample ~]$ sudo docker run -ti armv7/armhf-ubuntu /bin/bash
root@10e903b98b20:/# ps
PID TTY TIME CMD
1 ? 00:00:00 bash
10 ? 00:00:00 ps
root@10e903b98b20:/# ping google.com
bash: ping: command not found
root@10e903b98b20:/# curl google.com
bash: curl: command not found
root@10e903b98b20:/# apt-get update

Err http://ports.ubuntu.com wily InRelease

0% [Connecting to ports.ubuntu.com]

root@10e903b98b20:/# cat /etc/resolv.conf
# This file is managed by systemd-resolved(8). Do not edit.
#
# Third party programs must not access this file directly, but
# only through the symlink at /etc/resolv.conf. To manage
# resolv.conf(5) in a different way, replace the symlink by a
# static file or a different symlink.

nameserver 8.8.8.8
nameserver 8.8.4.4



Final docker info after reinstall:

$this->bbcode_second_pass_quote('', '
')docker info
Containers: 4
Images: 5
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 13
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.1.11-1-ARCH
Operating System: Arch Linux ARM (containerized)
CPUs: 4
Total Memory: 923.1 MiB
Name: dockerexample
ID: PHOV:TXBF:YD3Y:NBRW:ZSUH:G4K3:KHIP:XIKP:GIO7:O54S:LDLK:YBI6
WARNING: No memory limit support
WARNING: No swap limit support


docker 1.8.1 works fine on my Intel NUC.
alexellis
 
Posts: 13
Joined: Wed Feb 18, 2015 12:37 am
Top

Re: Docker base image for Arch ARM

Postby manchoz » Tue Oct 27, 2015 7:51 am

Which kind of hardware are you running docker on? (Raspberry PI, BeagleBone, etc.)

Could be the issue related to some misconfiguration of the host system?
manchoz
 
Posts: 5
Joined: Fri Sep 25, 2015 9:44 am

Re: Docker base image for Arch ARM

Postby WarheadsSE » Tue Oct 27, 2015 12:15 pm

With the spec from that output, I would bet RPi2.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests