Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Dockerfile for arm32v7 #564

Closed
wants to merge 1 commit into from
Closed

add Dockerfile for arm32v7 #564

wants to merge 1 commit into from

Conversation

@andreycizov
Copy link

andreycizov commented Aug 2, 2019

No description provided.

@buchdag

This comment has been minimized.

Copy link
Collaborator

buchdag commented Aug 3, 2019

Hi

Could you elaborate on why this is needed ? The existing Dockerfile already use natively multiarch images and should build just fine on arm32v7.

https://github.com/docker-library/official-images#architectures-other-than-amd64

As of 2017-09-12, these other architectures are included under the non-prefixed images via "manifest lists" (also known as "indexes" in the OCI image specification), such that, for example, docker run hello-world should run as-is on all supported platforms

[buchdag@host ~]$ docker manifest inspect alpine:3.9
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 528,
         "digest": "sha256:bf1684a6e3676389ec861c602e97f27b03f14178e5bc3f70dce198f9f160cce9",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 528,
         "digest": "sha256:fc6ad107f85e5210d7cbbdb00b6af0b8b1c94a2b0cecc77db19e853b87cd549e",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v6"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 528,
         "digest": "sha256:f6d15ec5c7cf08079309c59f59ff1e092eb9a678ab891257b1d2b118e7aecc2b",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v7"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 528,
         "digest": "sha256:1032bdba4c5f88facf7eceb259c18deb28a51785eb35e469285a03eba78dd3fc",
         "platform": {
            "architecture": "arm64",
            "os": "linux",
            "variant": "v8"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 528,
         "digest": "sha256:1be52adf0390937540f21f66fb8dc4c155b3a0325e380001be08fd5923359e81",
         "platform": {
            "architecture": "386",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 528,
         "digest": "sha256:cb238aa5b34dfd5e57ddfb1bfbb564f01df218e6f6453e4036b302e32bca8bb5",
         "platform": {
            "architecture": "ppc64le",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 528,
         "digest": "sha256:d438d3b6a72b602b70bd259ebfb344e388d8809c5abf691f6de397de8c9e4572",
         "platform": {
            "architecture": "s390x",
            "os": "linux"
         }
      }
   ]
}
[buchdag@host ~]$ docker manifest inspect golang:1.12-alpine
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1365,
         "digest": "sha256:1b8a5e7aad9be99e4d795ab2e108270ccaa6ca1bceb34d46489e91cc5cd09c36",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1365,
         "digest": "sha256:7e929cc23fc1c373793c7dec8a2cbd6a64d2a2d007a3393f273dee5b6e46d4c9",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v6"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1365,
         "digest": "sha256:b49d58b8a6ecd45fa05182540006b7c32e77b82f2f7982587db52823e2cffe8d",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v7"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1365,
         "digest": "sha256:1f41225fba4a4a9d36cbb99ea2adcc1e31f2b7658b4afaa689616c9433d317a0",
         "platform": {
            "architecture": "arm64",
            "os": "linux",
            "variant": "v8"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1365,
         "digest": "sha256:5d61827041e0e59df59804cbd03e50e0826c0c29ad357e0b742e0945c0030b7f",
         "platform": {
            "architecture": "386",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1365,
         "digest": "sha256:4b685dd77d1290005ba2e5eb0657e5e92013680f704e83e7c419a0a8ee4dea43",
         "platform": {
            "architecture": "ppc64le",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1365,
         "digest": "sha256:af101201fa03f766b6bf29c9c1b2767323fc950f6f698d26a2b9c8f7edb233d4",
         "platform": {
            "architecture": "s390x",
            "os": "linux"
         }
      }
   ]
}
@andreycizov

This comment has been minimized.

Copy link
Author

andreycizov commented Aug 7, 2019

So I assume there's still no way I can get this armv7 image from a repository without building it?

@buchdag

This comment has been minimized.

Copy link
Collaborator

buchdag commented Aug 7, 2019

Unfortunately adding a .arm32v7 Dockerfile won't make this arch available from Dockerhub.

You still have to build this image somewhere and push it to the repository, and neither Dockerhub nor Travis CI offer to test/build on arm hosts.

I already considered making other archs available from Dockerhub natively a while ago, but the fact that neither nginx-proxy nor docker-gen have other archs available from Dockerhub themselves means you'll have to resort to building those images anyway and make the whole thing (at least trying to automate it) a waste of time.

And this is does not even scratch the tests issue.

@guysoft

This comment has been minimized.

Copy link

guysoft commented Oct 24, 2019

Hey guys, this has changed and now using docker manifest command and hooks you can have docker hub build an armv7 image. As well as a amd64. Using the manifest you can create a tag that will have both arches and have docker automatically pull the correct arch.

I am in the process of adding this functionality to my project (CustomPiOS). And I have working code at: https://github.com/guysoft/CustomPiOS/tree/docker-multiarch/src

And a working test image at (note you can see both arches on the same tag on mouseover):
https://cloud.docker.com/repository/docker/guysoft/custompios-test/tags

I need this because I am moving all my build server to arm. And this peace of the puzzle is missing.

It would be wonderful to re-open this. And I as I progress I could PR a working docker-hub automatic build and explain what you need to do for this to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.