#running go sdk getting started example twice fails

1 messages · Page 1 of 1 (latest)

stiff adder
#

Hello,

I am experiencing an issue whereby if I run the getting started example twice I get the following error:
Error: failed to run container: time="2022-11-28T19:31:02+02:00" level=fatal msg="name \"dagger-engine-41f71f0036167fcc\" is already used by ID \"5aa3a5b226b0cdf98212854dd5e3b177afc4fe624ec45dd63339c7011f900716\""
Any further attempts to run the example fail. I first have to manually kill the session container before the error disappears. It returns the moment I attempt to run the example back to back.

FYI I am using containerd & nerdctl to run my images. I am curious to know if this is an issue specific to me using containerd or if I missing something.

gleaming shuttle
#

Hey, yeah based on that error message I think this is probably caused by use of containerd+nerdctl. Basically, we expect and try to ignore that particular error (container already running) but the error message is different when using actual docker vs. nerdctl so our check fails.

I think it's an easy fix, I'll try it really quick

#

https://github.com/dagger/dagger/pull/4006

In the meantime, a (far from ideal) workaround is to set this env var after you have successfully run it once: DAGGER_RUNNER_HOST=docker-container://dagger-engine-41f71f0036167fcc

However, that env var is only used internally for now and is likely going to change in the near future, so this is just a very temporary workaround to unblock you

GitHub

Signed-off-by: Erik Sipsma erik@sipsma.dev
User report that the provisioner doesn't work w/ nerdctl: #1046845155761733713 message
I do...