djmaze / armhf-ubuntu-docker

Ubuntu-Core images for armhf (ARMv7+) devices
59 stars 16 forks source link

Recent images don't appear to contain qemu-arm-static #2

Closed trainman419 closed 9 years ago

trainman419 commented 9 years ago

I'm not sure if this is a bug, or if I'm just misunderstanding how these images were intended to be used, but it looks like the qemu-arm-static binary is missing from the current images:

$ docker run mazzolino/armhf-ubuntu:trusty echo hello world
2014/12/03 08:25:02 no such file or directory

It works if I manually mount qemu-arm-static into the image:

$ docker run -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static mazzolino/armhf-ubuntu:trusty echo hello world
hello world

I'm running the stock version of docker on Ubuntu Trusty:

$ docker version
Client version: 1.0.1
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 990021a
Server version: 1.0.1
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 990021a

Image info:

$ docker inspect mazzolino/armhf-ubuntu:trusty
[{
    "Architecture": "arm",
    "Author": "",
    "Comment": "",
    "Config": {
        "AttachStderr": false,
        "AttachStdin": false,
        "AttachStdout": false,
        "Cmd": [
            "sh",
            "-c",
            "dpkg-divert --local --rename --add /sbin/initctl \u0026\u0026                ln -s /bin/true /sbin/initctl \u0026\u0026                sed -i -e 's/# \\(.*universe\\)$/\\1/' /etc/apt/sources.list \u0026\u0026                export DEBIAN_FRONTEND=noninteractive; apt-get update \u0026\u0026 apt-get -y upgrade"
        ],
        "CpuShares": 0,
        "Cpuset": "",
        "Domainname": "",
        "Entrypoint": null,
        "Env": [],
        "ExposedPorts": {},
        "Hostname": "",
        "Image": "",
        "Memory": 0,
        "MemorySwap": 0,
        "NetworkDisabled": false,
        "OnBuild": null,
        "OpenStdin": false,
        "PortSpecs": null,
        "StdinOnce": false,
        "Tty": false,
        "User": "",
        "Volumes": {},
        "WorkingDir": ""
    },
    "Container": "30d4db9bd0493abcb745a63f278655f2e978746bb90239f43cdf50d2ca97fa38",
    "ContainerConfig": {
        "AttachStderr": false,
        "AttachStdin": false,
        "AttachStdout": false,
        "Cmd": [
            "sh",
            "-c",
            "dpkg-divert --local --rename --add /sbin/initctl \u0026\u0026                ln -s /bin/true /sbin/initctl \u0026\u0026                sed -i -e 's/# \\(.*universe\\)$/\\1/' /etc/apt/sources.list \u0026\u0026                export DEBIAN_FRONTEND=noninteractive; apt-get update \u0026\u0026 apt-get -y upgrade"
        ],
        "CpuShares": 0,
        "Cpuset": "",
        "Domainname": "",
        "Entrypoint": null,
        "Env": [],
        "ExposedPorts": {},
        "Hostname": "30d4db9bd049",
        "Image": "mazzolino/armhf-ubuntu:14.04",
        "Memory": 0,
        "MemorySwap": 0,
        "NetworkDisabled": false,
        "OnBuild": null,
        "OpenStdin": false,
        "PortSpecs": null,
        "StdinOnce": false,
        "Tty": false,
        "User": "",
        "Volumes": {},
        "WorkingDir": ""
    },
    "Created": "2014-09-29T23:31:16.51118951Z",
    "DockerVersion": "1.0.0",
    "Id": "a82937bfa76a9e44c1436cd583cdfe8c13899e10e7cfb8ea9ae68f817a4a4b6e",
    "Os": "linux",
    "Parent": "7dbf639c956c01ea0d0c98eeaef054d077036ad839b731a3769954979ba88617",
    "Size": 129388193
}
djmaze commented 9 years ago

Right, qemu-arm-static should be included, so something must be going wrong here. Will have a look ASAP!

djmaze commented 9 years ago

TL/DR: Fixed it.

Long explanation: For quite a time, it wasn't possible anymore to upgrade all packages. udev bailed out at upgrading, seemingly because of hotplugging problems with qemu. For that reason, I had built the last images directly on ARM hardware. Of course, qemu-arm-static was not available in the right architecture there.

I changed the upgrade process to keep the installed udev version instead of upgrading it. Now the images were correctly rebuilt on my amd64 machine.

This is more of a workaround. I would be glad if someone found a real solution!