Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Wrong Image Architecture #29

Closed
whatever4711 opened this issue Jul 7, 2017 · 11 comments
Closed

Wrong Image Architecture #29

whatever4711 opened this issue Jul 7, 2017 · 11 comments

Comments

@whatever4711
Copy link

The image is delivered with
"Architecture": "amd64",
and can not be start on a RPi swarm with Docker Version 17.06.

@StefanScherer
Copy link
Member

Are you able to start another image with 17.06 in a swarm?

@StefanScherer
Copy link
Member

As we build this image on Travis the Architecture shows amd64

$ curl -sL https://registry.hub.docker.com/v2/repositories/hypriot/rpi-traefik/tags/latest | jq .
{
  "name": "latest",
  "full_size": 28200496,
  "images": [
    {
      "size": 28200496,
      "architecture": "amd64",
      "variant": null,
      "features": null,
      "os": "linux",
      "os_version": null,
      "os_features": null
    }
  ],
  "id": 3172980,
  "repository": 709170,
  "creator": 560640,
  "last_updater": 561768,
  "last_updated": "2017-07-07T09:06:28.177110Z",
  "image_id": null,
  "v2": true
}

But running this image as container or as service normally isn't blocked by the ARM Docker engine.
With 17.06 I have problems running services in swarm mode with either such cross built images as well as natively built images (like stefanscherer/whoami:test)

Only issue with such ARM images built on Travis is drafting a multi-arch manifest list with the upcoming docker manifest command. You have to annotate the image to be an arm image as I have done it in StefanScherer/whoami@8b51c87
At the moment I prefer the manifest-tool which can do this in one step StefanScherer/whoami@aaa30d3

@StefanScherer
Copy link
Member

@whatever4711 see also my investigations with swarm mode on different RPi OS'es in hypriot/image-builder-rpi#176

@StefanScherer
Copy link
Member

@whatever4711 There is a workaround to start swarm mode services, just add --no-resolve-image. A "Better Architecture comparison for Platform filter" was added two months ago, but this does not take care of different armv6l, armv7l node architecture <-> arm image architecture.

@whatever4711
Copy link
Author

@StefanScherer thanks for the work-around. Hopefully, this architecture selection problem will be fixed in the near future. I also tried @firecyberice multiarch traefik build for amd64 and arm, which provides correct architecture tags, but in Swarm mode the arm images were not added to the supported platform field.

However, I think for the future the images on docker hub / cloud should be provided with the correct platforms tag.

@nsteinmetz
Copy link
Contributor

@whatever4711, if you wish or if it can help you, you can test with nsteinmetz/traefik-arm image.

I just built it on my rpi with the same dockerfile as for hypriot/rpi-traefik.

@whatever4711
Copy link
Author

whatever4711 commented Jul 19, 2017

@nsteinmetz, I tried your image, but it is not firing up the container in swarm mode. For now only --no-resolve-image is a usable workaround. Or if you like to use stacks: docker stack deploy --resolve-image never
selection_033
My cluster consists of armv7l SBCs.

@firecyberice
Copy link
Member

There is an issue at swarmkit

@nsteinmetz
Copy link
Contributor

nsteinmetz commented Sep 13, 2017

With new official images provided by Traefik team (see Readme for instructions) and Support of manifest, you may test again and switch to official images (as for hypriot/rpi-traefik, it remains amd64 and that I no longer plan to update the repo due to the official images...)

@nsteinmetz
Copy link
Contributor

nsteinmetz commented Sep 13, 2017

Confirmed ; Architecture is now arm

[
    {
        "Id": "sha256:4acff2fff85bc5238a00435057793988786cfd055f93b9152e8a78934b8b2037",
        "RepoTags": [
            "traefik:latest"
        ],
        "RepoDigests": [
            "traefik@sha256:1d152e1b4c8161d4752684a4b51ef4f399ef76779adab085cf16aa268b8f6623"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2017-09-09T00:47:08.590765573Z",
        "Container": "96bb690c54d5ad3b475c1de0a08ccf35c025c7e74173b947374507ae5d96882b",
        "ContainerConfig": {
            "Hostname": "96bb690c54d5",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "LABEL org.label-schema.vendor=Containous org.label-schema.url=https://traefik.io org.label-schema.name=Traefik org.label-schema.description=A modern reverse-proxy org.label-schema.version=v1.3.8 org.label-schema.docker.schema-version=1.0"
            ],
            "Image": "sha256:5b1bd81bfdcb791a315659a8f5dc5a2ef9f973ef469d4c9b9acec65a128a9511",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/traefik"
            ],
            "OnBuild": null,
            "Labels": {
                "org.label-schema.description": "A modern reverse-proxy",
                "org.label-schema.docker.schema-version": "1.0",
                "org.label-schema.name": "Traefik",
                "org.label-schema.url": "https://traefik.io",
                "org.label-schema.vendor": "Containous",
                "org.label-schema.version": "v1.3.8"
            }
        },
        "DockerVersion": "17.06.1-ce",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": null,
            "Image": "sha256:5b1bd81bfdcb791a315659a8f5dc5a2ef9f973ef469d4c9b9acec65a128a9511",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/traefik"
            ],
            "OnBuild": null,
            "Labels": {
                "org.label-schema.description": "A modern reverse-proxy",
                "org.label-schema.docker.schema-version": "1.0",
                "org.label-schema.name": "Traefik",
                "org.label-schema.url": "https://traefik.io",
                "org.label-schema.vendor": "Containous",
                "org.label-schema.version": "v1.3.8"
            }
        },
        "Architecture": "arm",
        "Os": "linux",
        "Size": 37326575,
        "VirtualSize": 37326575,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/f9dc3014b09b76083ce254ce048c14e939a1f09216d8b24a5e1a4bf56de3e0a1/diff",
                "MergedDir": "/var/lib/docker/overlay2/f47009d90424069058deacd642676aef575885875a3117e9b812e6761e0fc7d2/merged",
                "UpperDir": "/var/lib/docker/overlay2/f47009d90424069058deacd642676aef575885875a3117e9b812e6761e0fc7d2/diff",
                "WorkDir": "/var/lib/docker/overlay2/f47009d90424069058deacd642676aef575885875a3117e9b812e6761e0fc7d2/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:c55086d0f35039ed935fe70b934630f5213feb4057fa1a71823514962f9d1b26",
                "sha256:85f5c3910617dc950fb74fec92d10e88f74c0c9e8faded095e1757c2c2356713"
            ]
        }
    }
]

@StefanScherer
Copy link
Member

Yes, the official images for ARM are built on real ARM devices, so the Architecture entry also is arm.
Thanks @nsteinmetz for maintaining this image. It's great to see more and more official images for ARM, so the community can switch over to these.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants