#Is there any way to run commands against

1 messages · Page 1 of 1 (latest)

polar niche
#

I am not talking about connecting to an exposed port, but rather using a CLI in the Service container that requires the entrypoint to have executed and the Service to be healthy.

brittle wave
#

I don't think this is possible at the moment, but can you share more about your concrete use case?

polar niche
#

Starting a k3s I would like to run some ctr commands to preload container images. It requires k3s to be running, so I cannot do it before that. I know of the Docker registry workaround but would like to avoid that, especially since that makes it a bit hard to dynamically load images and keep tags from the image manifest.

brittle wave
#

Thanks! I agree this would be useful, right now as soon as something becomes a service it terminates any further chaining.

I am wondering if as a workaround for now we could hack the entrypoint to do something after the service starts

I think this may work for a one-off "start the service and do X" -- still does not support advanced things like interacting with the service container down the line

indigo crescent
polar niche
#

This would require either a change in the image, or overriding the entrypoint in Dagger, right?
Either way, not a very general way of handling this problem as it will depend on the concrete container.

brittle wave
turbid stream
#

We are also struggling to use dagger for I think a very similar use case right now.

We'd like to let developers start one or more long running services in dagger, including kubernetes, exposed via local ports, but also be able to interact with those running services via other invocations of dagger call over days/weeks/months.

indigo crescent