Open tyb-dev opened 1 year ago
I am wondering if this is the same problem causing me difficulties related to multi-architecture builds. If I try to do this in my Dockerfile, I'd expect to get the $BUILDPLATFORM from docker, similar to how it appears via the docker CLI.
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build-env
According to the docs, that only appears with buildkit. https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope
Any ETA on a fix for this? I would love to be able to use buildKit.
I have similar issue when using RUN --mount...
in the Dockerfile - https://docs.docker.com/build/building/secrets/#target
the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled
back in May I took a shot at forking this library and using v2 of the docker API; so as to unlock buildkit support. However, when you do that, and you request buildkit in the v2 API, it gives you back logs as the encoded protobuf structures directly from the GO implementation. This library doesn't have the protobuf decoders installed, so its essentially impossible to decode the log messages to gather any sort of progress information. To be honest, it was a pain, and I gave up and started invoking docker via the CLI instead.
I landed here after not understanding why TestContainers was not working for me.
It is crucial to add Buildx
support. Docker went all in on it, along with containerd
. .Net is also multiplatform, the ability to test multiplatform images is very relevant now.
Output of
dotnet --info
:What version of Docker.DotNet?:
Steps to reproduce the issue: Dockerfile
Code (ConsoleApp calling BuildImageFromDockerfileAsync)
What actually happened?:
What did you expect to happen?: Image is created equivalent to doing
docker build
on the command line.Additional information: https://github.com/moby/moby/issues/41711#issuecomment-733281140