Skip to content

Add support for building ARM images#28

Merged
MichaelSimons merged 2 commits intodotnet:masterfrom
MichaelSimons:arm-support
Jul 20, 2017
Merged

Add support for building ARM images#28
MichaelSimons merged 2 commits intodotnet:masterfrom
MichaelSimons:arm-support

Conversation

@MichaelSimons
Copy link
Member

This required a schema change to the manifest. The following is an example of the new schema used in the dotnet-docker-nightly repo.

{
  "sharedTags": [
    "2.0.0-preview3-runtime",
    "2.0-runtime",
    "2-runtime"
  ],
  "platforms": [
    {
      "dockerfile": "2.0/runtime/stretch",
      "os": "linux",
      "tags": [
        "2.0.0-preview3-runtime-stretch"
      ]
    },
    {
      "architecture": "arm",
      "dockerfile": "2.0/runtime/stretch/arm32v7",
      "os": "linux",
      "tags": [
        "2.0.0-preview3-runtime-stretch-arm32v7",
        "2.0-runtime-stretch-arm32v7",
        "2-runtime-stretch-arm32v7"
      ],
      "variant": "armv7"
    },
    {
      "dockerfile": "2.0/runtime/nanoserver",
      "os": "windows",
      "tags": [
        "2.0.0-preview3-runtime-nanoserver",
        "2.0.0-preview3-runtime-nanoserver-$(nanoServerVersion)",
        "2.0-runtime-nanoserver",
        "2.0-runtime-nanoserver-$(nanoServerVersion)",
        "2-runtime-nanoserver",
        "2-runtime-nanoserver-$(nanoServerVersion)"
      ]
    }
  ]
}

Related #19

@MichaelSimons MichaelSimons requested a review from dagood July 18, 2017 22:16
@dnfclas
Copy link

dnfclas commented Jul 18, 2017

@MichaelSimons,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@MichaelSimons
Copy link
Member Author

@dagood, would you have time to take a look at this? Thanks

Copy link
Member

@dagood dagood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits and a suggestion, but LGTM.

architecture = Architecture.ARM;
break;
default:
throw new NotSupportedException("Unknown Docker Architecture");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good place for PlatformNotSupportedException.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

{
string architecture = GetArgValue(args, ref i, "architecture");
options.Architecture = (Architecture)Enum.Parse(typeof(Architecture), architecture, true);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra blank line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

}

public static RepoInfo Create(Repo model, Manifest manifest, string dockerOS, string includePath)
public static RepoInfo Create(Repo model, Manifest manifest, Options options, string dockerOS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little concerned with passing in Options... it has a ton of stuff that isn't needed to create the view model. Looks fine as a quick way to pass in everything needed, but could be better I think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hesitant to do this in the first place - reverted back to passing individual params.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought would be to have a ManifestInfoFilter data object that Options fills in, or that gets generated from Options properties.

@MichaelSimons MichaelSimons merged commit e24cf5d into dotnet:master Jul 20, 2017
@MichaelSimons MichaelSimons deleted the arm-support branch September 23, 2019 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants