#run engine locally
1 messages ยท Page 1 of 1 (latest)
You can find it here:
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
189724a917eb moby/buildkit:v0.10.5 "buildkitd --debug" 2 hours ago Up 2 hours dagger-buildkitd
aa4975eea72e ghcr.io/dagger/engine:v0.3.4 "buildkitd --debug" 15 hours ago Up 15 hours dagger-engine-666b958a2f716c0d
So, if I understand properly, you want to tweak it for a PR ?
Nothing set yet, I'm just trying to run the engine locally with Go but without documentation for running things locally it's tricky to know what to do.
Can I do a docker build -t <WHATEVER> . && docker run -t <WHATEVER> in the root of the project?
Or how would I run this for example? What's the expected flow for the command line arguments it's asking for https://github.com/dagger/dagger/blob/2126901e1ea76a6d861b62a9ef5ab09a4cc66eb7/cmd/dagger/main.go#L42
I also tried to do mage engine:dev in the root of the project but that fails:
Error: buildkit failed to respond
Error: EOF
Please visit https://dagger.io/help#go for troubleshooting guidance.
Actually, the engine architecture has been changing a lot lately: https://github.com/dagger/dagger/pull/3913. It's a part that is not documented for the moment, as, even though the API is quite stable, this part might change a lot.
From our cloned repo, do
- ./hack/make engine:dev
- That should give you a export DAGGER_HOST=โฆ command to run in order to use the dev engine
Now, to use a different version of the Go SDK, against this engine
- to use the updated Go SDK in your project, add to your go.mod: replace dagger.io/dagger => <path to dagger repo>/sdk/go
Oh I see if I do this I can get the playground to start ๐
basically, rely on ./hack/make engine:dev to set up a dev engine
Doesn't work, it times out saying buildkit failed to respond
Can I run the engine without an SDK? I'm focusing on modifying the internals initially
My docker run command seems to work, but if there's a better option let me know as I'm no Go expert
Works fine for me, try to rm all the stopped containers ๐ and retry
Do you have ideas on contributions ? Internal changes need close sync-up with maintainers. Do not hesitate to make issues / draft PRs prior going into work that might become hardly mergeable if not in context with long-term vision on engine architecture
Private registry support. I had a convo with Solomon about it a couple of days ago.
Yeah It'll just be a draft PR/hack if I'm lucky ๐
Out of interest, how is this different to the docker run command I posted?
Your Dockerfile builds cloak, which is the equivalent of the dagger CLI. It has been depcrecated for the launch of the SDKs. It used to contain a server (dev command), but it's not relying on the same engine provisioning code than the SDKs
It wouldn't have taken all the changes into account ๐
I will try and update the Dockerfile then
It's deprecated I think. You should more play with the engine, and rebuilt it using the above command ๐
Unfortunately the engine:dev step fails the second time around
: exit status 1```
Ah I know what it is, if the DAGGER_HOST is set but there's no image it borks.
~~I'm getting strange results when running the engine locally and pointing my go.mod file at a local copy of the Go SDK.
- If I use the publish v0.4.0 of the dagger go sdk, it complains with x509 certificate signed by unknown authority
- If I point it at the local SDK, it does not complain at all. Initially I assumed someone had just beaten me to a fix, but it's because it fails silently i.e. the image is not exported to the private registry
Is the engine:dev command going down a different code path to the published version or am I doing something dumb here?~~
Nvm fixed