-
Notifications
You must be signed in to change notification settings - Fork 480
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
Trying to use buildx and .net core not working, .net core issue? #105
Comments
cc @tuonga @RamblingGeekUK You should have more logs after the failure. You can try |
Sorry it took me a little while to get back to you here you go : `d:\Dev\dockertesting>docker buildx build --platform linux/amd64,linux/arm64 -t ramblinggeekuk/dockertesting --push . --progress=plain #2 [internal] load .dockerignore #3 [linux/arm64 internal] load metadata for mcr.microsoft.com/dotnet/core/s... #4 [linux/arm64 internal] load metadata for mcr.microsoft.com/dotnet/core/a... #11 [internal] load build context #9 [linux/arm64 build-env 1/6] FROM mcr.microsoft.com/dotnet/core/sdk:2.2 #7 [linux/arm64 stage-1 1/3] FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 #5 [linux/amd64 internal] load metadata for mcr.microsoft.com/dotnet/core/s... #6 [linux/amd64 internal] load metadata for mcr.microsoft.com/dotnet/core/a...
|
|
yeah, that's what I'm confused by, if .net core runs on arm, how do I tell it to grab the correct version? |
If the base images are only for |
I am not sure what you are trying to run, but the current runtime has amd64 arm64 and armv7 (not no v6) for example FROM mcr.microsoft.com/dotnet/core/runtime I just used this and buildx to build a multiplatform release - sooo much easier thanks, this is awesome project |
EnvironmentMachine= Xubuntu 18.04, 12GB RAM Installed
Using the command
Command Used to generate the images
Error
I used the Dockerfile:
SolutionReplacing sdk:3.0 with sdk:3.0-alpine and it worked.
|
@franciscojsc It worked but how did you figure out? |
Despite using |
which image?
|
Tested
Yep, that's my point. Though,
... but when I try to build any of the multi-arch images with
|
Related: dotnet/dotnet-docker#1537 My goal is to use Travis to build a multi-arch docker image that can target Importantly, I can build using the |
I've also ran into this issue. The only way I managed to fix it is by manually doing a build with a specific docker file. Basically following this pattern: Apparently the issue is that you can't build ARM32 images on an ARM64 host. I don't understand why or how we can fix this with buildx though. |
It makes sense you can't build for an arch if the source image doesn't contain that arch. Could the error message be made more comprehensible though? |
You also get this error if you mistype your arch... |
You can test with QEMU from https://github.com/tonistiigi/binfmt that is made for running containers:
|
Is this a .net issue or a buildx issue ?
Building for AMD/64 works fine :
d:\Dev\dockertesting>docker buildx build --platform linux/amd64 -t ramblinggeekuk/dockertesting --push . [+] Building 211.7s (15/15) FINISHED => [internal] load build definition from Dockerfile 0.2s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.3s => => transferring context: 2B 0.0s => [internal] load metadata for mcr.microsoft.com/dotnet/core/aspnet:2.2 1.1s => [internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:2.2 1.2s => [build-env 1/6] FROM mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:b4c25c26dc73f498073fcdb4aefe1677 110.2s => => resolve mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:b4c25c26dc73f498073fcdb4aefe167793eb3a8c79ef 0.0s => => sha256:b4c25c26dc73f498073fcdb4aefe167793eb3a8c79effa76df768006b5c345b8 2.19kB / 2.19kB 0.0s => => sha256:36add2b62b779b538e3062839e1978d78e12e26ec2214940e9043924a29890c0 1.80kB / 1.80kB 0.0s => => sha256:ade3808af4d74b6181b7412b73314b5806fa39d140def18c6ee1cdbcb3ed41b1 300.69MB / 300.69MB 40.3s => => sha256:52c7fe5918815504427b3168845267e876464f8b010ccc09d0f61eb67dd6a17e 4.41kB / 4.41kB 0.0s => => sha256:dbdc36973392a980d56b8fab63383ae44582f6502001d8bbdd543aa3bf1d746e 10.79MB / 10.79MB 9.3s => => sha256:aaef3e0262580b9032fc6741fb099c7313834c7cf332500901e87ceeb38ac153 50.07MB / 50.07MB 58.7s => => sha256:a4d8138d0f6b5a441aaa533faf5fe0c3996a6ca42643c46f4402c7e8bda53742 45.34MB / 45.34MB 53.0s => => sha256:f59d6d019dd5b8398eb8d794e3fafe31f9411cc99a71dabfa587bf732b4a7385 4.34MB / 4.34MB 62.4s => => sha256:f62345fbba0dbbb77ba8aca5b81a4f0d8ec16c5d540def66c0b8e8d6492fa444 13.25MB / 13.25MB 59.3s => => sha256:373065ab5fafec0e8bcfd74485dcd728f40b80800867c553e80c7cd92cd5d504 173.83MB / 173.83MB 79.8s => => unpacking mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:b4c25c26dc73f498073fcdb4aefe167793eb3a8c7 29.0s => [stage-1 1/3] FROM mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:b18d512d00aff0937699014a9ba44234 54.5s => => resolve mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:b18d512d00aff0937699014a9ba44234692ce424c 0.0s => => sha256:b18d512d00aff0937699014a9ba44234692ce424c70248bedaa5a60972d77327 2.19kB / 2.19kB 0.0s => => sha256:8bd16a07ec8b72f4131a1747ff479048db65b48f54ae2ced1ffb1b42798c952e 1.16kB / 1.16kB 0.0s => => sha256:318149b63beb70e442e84e530f4472f9354e3906874c35be2ba5045b5f7a8c7a 4.06kB / 4.06kB 0.0s => => sha256:fc7181108d403205fda45b28dbddfa1cf07e772fa41244e44f53a341b8b1893d 22.49MB / 22.49MB 27.7s => => sha256:2c86df27317feb8a2806928aa12f27e6c580894e0cb844cb25aaed1420964e3d 17.69MB / 17.69MB 40.7s => => sha256:66dd687a6ad17486c0e3bc4e3c3690cefb7de9ad55f654e65cf657016ed4194c 2.98MB / 2.98MB 41.5s => => sha256:a7638d93f1fe40e3393bfb685305ce5022179c288f5b2a717978ccae465b4d7a 62.13MB / 62.13MB 48.1s => => unpacking mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:b18d512d00aff0937699014a9ba44234692ce42 5.2s => [internal] load build context 0.5s => => transferring context: 6.63kB 0.0s => [stage-1 2/3] WORKDIR /app 0.4s => [build-env 2/6] WORKDIR /app 0.2s => [build-env 3/6] COPY *.csproj ./ 0.7s => [build-env 4/6] RUN dotnet restore 10.7s => [build-env 5/6] COPY . ./ 0.4s => [build-env 6/6] RUN dotnet publish -c Release -o out 3.6s => [stage-1 3/3] COPY --from=build-env /app/out . 0.3s => exporting to image 83.5s => => exporting layers 1.0s => => exporting manifest sha256:6ac874b02ae2ce6c86c5d79290a04694778b2f86ff787285650c11dce4b2a37e 0.2s => => exporting config sha256:e9625bb3b3e783bcb6f6b7dd8b3ad4a1f090a1156be3bf237d5d4b7c8f97ebcc 0.2s => => pushing layers 81.3s => => pushing manifest for docker.io/ramblinggeekuk/dockertesting:latest 0.6s
Building for linux/arm/v7 - fails...
'd:\Dev\dockertesting>docker buildx build --platform linux/arm/v7 -t ramblinggeekuk/dockertesting --push .
[+] Building 112.6s (11/14)
=> [internal] load .dockerignore 0.2s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.3s
=> => transferring dockerfile: 443B 0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/core/aspnet:2.2 1.5s
=> [internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:2.2 1.6s
=> [build-env 1/6] FROM mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:b4c25c26dc73f498073fcdb4aefe1677 102.6s
=> => resolve mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:b4c25c26dc73f498073fcdb4aefe167793eb3a8c79ef 0.0s
=> => sha256:b4c25c26dc73f498073fcdb4aefe167793eb3a8c79effa76df768006b5c345b8 2.19kB / 2.19kB 0.0s
=> => sha256:27c2d2f8b92b964c1e3f4de6c8025b1f0362a1f3436118d77b3dbfa921cfd9c9 1.80kB / 1.80kB 0.0s
=> => sha256:493f51ba80c0d5fd46ea25516eb221089190b416d5a8cc2c898517dea68519a4 4.91kB / 4.91kB 0.0s
=> => sha256:e06d849c15a63e2cf30d5c5af0d9aa87b2f7c6cbfe0e8c3e351fa4c5d4666d11 300.71MB / 300.71MB 44.8s
=> => sha256:41835060b113803e2ca628a32805c2e1178fe441b81d3e77427749fec4de06e9 9.49MB / 9.49MB 45.9s
=> => sha256:da770cd5eae6caeefe9468e318964be31036c06e729c2d983756906ede859b17 46.39MB / 46.39MB 51.2s
=> => sha256:582caf5d2e7bf5e75a96afc2254a97f6e86ad72c8815429ada61280467cc6d6f 3.92MB / 3.92MB 45.0s
=> => sha256:dd04b2ffc5474ba8df46350a273baaf841243fda01cfe05d3e5429e4ecc9bb19 144.38MB / 144.38MB 73.9s
=> => sha256:fa48f739865746afb4020d2d370105be51d23dd6ad6faa8663e1365b607d46c2 13.04MB / 13.04MB 52.3s
=> => sha256:dcb61f1d45657be196f648f75a07805b856fb8f4aebb61138c03c12e2919ee9e 42.08MB / 42.08MB 57.5s
=> => unpacking mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:b4c25c26dc73f498073fcdb4aefe167793eb3a8c7 27.0s
=> [stage-1 1/3] FROM mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:b18d512d00aff0937699014a9ba44234 18.5s
=> => resolve mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:b18d512d00aff0937699014a9ba44234692ce424c 0.0s
=> => sha256:b18d512d00aff0937699014a9ba44234692ce424c70248bedaa5a60972d77327 2.19kB / 2.19kB 0.0s
=> => sha256:9ad51bcfeeb6e58218f23fb1f4c5229b39008cc245c9df1fcf8c9330c18a2acb 1.16kB / 1.16kB 0.0s
=> => sha256:8b7eead4e00d6228dbbf945848d78b43580687575eb8cba1d7a2b11129186f77 4.07kB / 4.07kB 0.0s
=> => sha256:a51e654c7ec5bf1fd3f38645d4bc8aa40f86ca7803d70031a9828ae65e3b67ae 63.47MB / 63.47MB 8.9s
=> => sha256:2eead4197fac409644fd8aaf115559d6383b0d56f1ad04d7116aaabbcbea8bed 19.28MB / 19.28MB 10.3s
=> => sha256:9358a462710e1891aec7076e8674e6f522f08a9f3624dc1f55554c2fc7cb99ea 16.30MB / 16.30MB 12.0s
=> => sha256:14144450932b5358107e71ebcd25ec878cb799ccc75ec39386e374d0dad903b3 2.88MB / 2.88MB 12.2s
=> => unpacking mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:b18d512d00aff0937699014a9ba44234692ce42 4.5s
=> [internal] load build context 0.2s
=> => transferring context: 7.04kB 0.0s
=> [stage-1 2/3] WORKDIR /app 0.2s
=> [build-env 2/6] WORKDIR /app 0.3s
=> [build-env 3/6] COPY *.csproj ./ 0.4s
=> ERROR [build-env 4/6] RUN dotnet restore 7.0s'
The text was updated successfully, but these errors were encountered: