Dagger certainly can build a container image natively, without requiring a Dockerfile. It also can build a docker image from a Dockerfile, thanks to a built-in compatibility bridge.
Dagger doesn't expose a raw buildkit socket, but it exposes a cleaner API that has 99% feature parity. Hitting the remaining 1% is rare, but it does happen :) Is there a specific buildkit feature you were looking for? Perhaps we can add it.
Here's an example from the CLI (keeping in mind that there are SDKs for Go, Python, Typescript, PHP and Java with 1-1 feature parity to the CLI):
1. Natively (without Dockerfile):
#!/usr/bin/env dagger
container |
from alpine |
with-exec apk add golang |
with-directory /src . |
with-workdir /src |
with-exec go build |
publish myregistry.tld/myimage:mytag
2. Build a local directory with Dockerfile: #!/usr/bin/env dagger
host |
directory . |
docker-build |
publish myregistry.tld/myimage:mytag
3. Build straight from git remote, with Dockerfile: #!/usr/bin/env dagger
git https://github.com/your/repo |
branch main |
tree |
docker-build |
publish myregistry.tld/myimage:mytag
I hope this helps! Sorry again that you got the wrong impression.