{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/18383","labels_url":"https://api.github.com/repos/docker/docker/issues/18383/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/18383/comments","events_url":"https://api.github.com/repos/docker/docker/issues/18383/events","html_url":"https://github.com/docker/docker/issues/18383","id":120084965,"number":18383,"title":"Proposal: ARCH statement in builder","user":{"login":"jhowardmsft","id":10522484,"avatar_url":"https://avatars.githubusercontent.com/u/10522484?v=3","gravatar_id":"","url":"https://api.github.com/users/jhowardmsft","html_url":"https://github.com/jhowardmsft","followers_url":"https://api.github.com/users/jhowardmsft/followers","following_url":"https://api.github.com/users/jhowardmsft/following{/other_user}","gists_url":"https://api.github.com/users/jhowardmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/jhowardmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhowardmsft/subscriptions","organizations_url":"https://api.github.com/users/jhowardmsft/orgs","repos_url":"https://api.github.com/users/jhowardmsft/repos","events_url":"https://api.github.com/users/jhowardmsft/events{/privacy}","received_events_url":"https://api.github.com/users/jhowardmsft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-03T03:05:20Z","updated_at":"2015-12-03T04:18:38Z","closed_at":null,"body":"Currently, it's not possible to have a cross-architecture dockerfile. This can be evidenced by the docker CI itself where the main image built downloads busybox (linux/amd64) in the dockerfile. Subsequently hoops are jumped through during test-integration-cli which ends up in .ensure-frozen-images to download/update/tag the linux/arm images to ARM specific ones.\r\n\r\nThis architecture problem obviously also applies to Windows as well, but is not a Windows specific proposal. I suggest using golang build-style directive-type syntax as a preface to a command. So a dockerfile might contain something like\r\n\r\n```\r\nARCH !windows: COPY linux.sh /runthis.sh\r\nARCH windows: COPY windows.cmd /runthis.cmd\r\nARCH !windows: ENTRYPOINT /runthis.sh\r\nARCH windows: ENTRYPOINT /runthis.cmd\r\n```\r\nor some more complex examples using the golang type and/or syntax\r\n\r\n```\r\nARCH linux,freebsd 386: <somecommand>\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/161510531","html_url":"https://github.com/docker/docker/issues/18383#issuecomment-161510531","issue_url":"https://api.github.com/repos/docker/docker/issues/18383","id":161510531,"user":{"login":"jhowardmsft","id":10522484,"avatar_url":"https://avatars.githubusercontent.com/u/10522484?v=3","gravatar_id":"","url":"https://api.github.com/users/jhowardmsft","html_url":"https://github.com/jhowardmsft","followers_url":"https://api.github.com/users/jhowardmsft/followers","following_url":"https://api.github.com/users/jhowardmsft/following{/other_user}","gists_url":"https://api.github.com/users/jhowardmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/jhowardmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhowardmsft/subscriptions","organizations_url":"https://api.github.com/users/jhowardmsft/orgs","repos_url":"https://api.github.com/users/jhowardmsft/repos","events_url":"https://api.github.com/users/jhowardmsft/events{/privacy}","received_events_url":"https://api.github.com/users/jhowardmsft/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T04:18:38Z","updated_at":"2015-12-03T04:18:38Z","body":"@jfrazelle @mikedougherty as this was thought of in the context of CI flakiness debugging."}}