I'm looking to use the Docker SDK to perform docker build --check .
.
But I don't see any option in the docs. Is there a way to "dry run" the Docker build process and surface issues without actually building?
This is because the docker SDK is for interacting with the docker engine/daemon. The --check
flag simply causes a lint to be performed, which is performed by the client, and does not interact with the daemon or engine. You will need a different tool if you want to lint the dockerfile.
You can see the lint implementation here and example of calling code.