Docker base image for Arch ARM

This forum is for discussion about general software issues.

Docker base image for Arch ARM

Postby vkoster » Thu Oct 15, 2015 10:28 am

Hi,
ARM images for Docker are scarce, especially based on Arch.
Is there a base, i.e. smallest possible, image around?
Or a guide of how to build one?
I found some, but they already contain more than I need.
thanks
vkoster
 
Posts: 6
Joined: Sun Sep 20, 2015 11:45 am

Re: Docker base image for Arch ARM

Postby WarheadsSE » Thu Oct 15, 2015 12:08 pm

They are not that hard.

Make clean/bare chroot, and then tarball it & import.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Docker base image for Arch ARM

Postby manchoz » Thu Oct 15, 2015 2:27 pm

Hi,
if you would like a bit of automation I made some small changes to Docker's mkimage-arch.sh script in order to build a base Arch Linux Arm base image. (see https://github.com/docker/docker/issues/16695 and https://github.com/docker/docker/pull/16704)

Just clone my docker fork and checkout the relevant branch.

$this->bbcode_second_pass_code('', '
$ git clone -b 16695_manchoz_archarm https://github.com/manchoz/docker.git
')

Install prerequisites

$this->bbcode_second_pass_code('', '
$ sudo pacman -S base-devel arch-install-scripts expect archlinuxarm-keyring
')

and build archlinuxarm baseimage

$this->bbcode_second_pass_code('', '
$ cd docker/contrib
$ sudo ./mkimage-arch.sh
')

At and of the process you should have your docker populated with an "archlinuxarm" image and a stopped archlinuxarm-generated container.

$this->bbcode_second_pass_code('', '
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
archlinuxarm latest 249420ee929d 47 hours ago 242.7 MB
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ff899c9e3e22 archlinuxarm "echo Success." 47 hours ago Exited (0) 47 hours ago nostalgic_bardeen
')

Let me know if something goes wrong.

@WarheadsSE, I am working heavy on Arch Linux ARM-based images for docker: may I offer my support to create/manage official Arch Linux ARM images on Docker Hub/Registry?

Bests,
Giampaolo
manchoz
 
Posts: 5
Joined: Fri Sep 25, 2015 9:44 am

Re: Docker base image for Arch ARM

Postby WarheadsSE » Thu Oct 15, 2015 2:36 pm

@manchoz we can possibly discuss that. I do have the group registered, Just haven't been importing them.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Docker base image for Arch ARM

Postby manchoz » Thu Oct 15, 2015 9:43 pm

Ok,
let's talk about it.

:-D
manchoz
 
Posts: 5
Joined: Fri Sep 25, 2015 9:44 am

Re: Docker base image for Arch ARM

Postby vkoster » Fri Oct 16, 2015 12:49 pm

Thank you very much guys. I'll follow up on your suggestions.
br
volker
vkoster
 
Posts: 6
Joined: Sun Sep 20, 2015 11:45 am

Re: Docker base image for Arch ARM

Postby alexellis » Sat Oct 24, 2015 4:33 pm

$this->bbcode_second_pass_code('', ' lz4-131-1-armv7h 60.2 KiB 463K/s 00:00 [####################################] 100%
shadow-4.2.1-3-armv7h 1033.7 KiB 512K/s 00:02 [####################################] 100%
tar-1.28-1-armv7h 609.6 KiB 469K/s 00:01 [####################################] 100%
haveged-1.9.1-2-armv7h 36.4 KiB 0.00B/s 00:00 [####################################] 100%
(86/86) checking keys in keyring [####################################] 100%
warning: Public keyring not found; have you run 'pacman-key --init'?
downloading required keys...
error: key "77193F152BDBE6A6" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.
==> ERROR: Failed to install packages to new root
mount: mount point /var/tmp/rootfs-archlinux-nBtZ35atKJ/etc/resolv.conf does not exist
==> ERROR: failed to setup resolv.conf')

:-( On latest Arch Linux Arm having recently done paceman -Syu and with required dependencies.
alexellis
 
Posts: 13
Joined: Wed Feb 18, 2015 12:37 am

Re: Docker base image for Arch ARM

Postby WarheadsSE » Sun Oct 25, 2015 12:31 pm

Read the output?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Docker base image for Arch ARM

Postby manchoz » Sun Oct 25, 2015 1:45 pm

Yes,
as indicated in the output, just execute

$this->bbcode_second_pass_code('', '
$ sudo pacman-key --init
$ sudo pacman -S archlinuxarm-keyring
')

and then regenerate the image.
manchoz
 
Posts: 5
Joined: Fri Sep 25, 2015 9:44 am

Re: Docker base image for Arch ARM

Postby alexellis » Mon Oct 26, 2015 8:50 am

I had run pacman-key --init - the actual error was not displayed, I needed the arm/alarm specific keychain package. I thought this was installed by default. Thanks

Having created a base system I started the image with Docker 1.7.1 and could access my internet and local network, however after starting a second container I had no network access at all. Rebooting was the only way to get the access stored - so in effect I could only start one container and then had to reboot.

It seems that other people are facing the same issue with arm7 boards and docker 1.7.1 and their suggestion is to build docker >1.8.1 which I started to do. Unfortunately a patch is required to change a libcontainer reference otherwise there are around half a dozen methods not found in the (default amd64) library which is included in the base code as of 1.8.1.

What version of docker are you chaps successfully running?

$this->bbcode_second_pass_code('', '---> Making bundle: dynbinary (in bundles/1.8.1/dynbinary)
# github.com/opencontainers/runc/libcontainer/seccomp
vendor/src/github.com/opencontainers/runc/libcontainer/seccomp/filter.go:93: undefined: jumpEqualTo
vendor/src/github.com/opencontainers/runc/libcontainer/seccomp/filter.go:95: undefined: jumpNotEqualTo
vendor/src/github.com/opencontainers/runc/libcontainer/seccomp/filter.go:97: undefined: jumpGreaterThan
vendor/src/github.com/opencontainers/runc/libcontainer/seccomp/filter.go:99: undefined: jumpLessThan
vendor/src/github.com/opencontainers/runc/libcontainer/seccomp/filter.go:101: undefined: jumpMaskEqualTo')

https://github.com/docker/docker/issues/14056

This error is also present in the newer branches such as 1.8.3 etc.
alexellis
 
Posts: 13
Joined: Wed Feb 18, 2015 12:37 am

Next

Return to General

Who is online

Users browsing this forum: No registered users and 7 guests