#Is it possible to build docker images inside of the container?

1 messages ยท Page 1 of 1 (latest)

hearty heron
#

I have couple of workflows I need to build docker images or create kind cluster. I wonder if I can use dagger GO SDK for those jobs or I am asking too much ๐Ÿค”

lilac loom
hearty heron
#

I have a slightly more complex scenarios which I want to keep same as much as possible.

#

First one is we're building docker images using goreleaser with couple of services together.

lilac loom
#

Mmh, it should be fine, I think

#

What services are you talking about ?

hearty heron
#

I guess services is not that relevant. Let me rephrase my original question. Can I mount docker.socket to dagger container? and if it's possible, How?

lilac loom
#

My bad, dagger go sdk doesn't seem to be able to mount sockets, for now: https://github.com/dagger/dagger/issues/3465. At least, we still do not expose an API for now. Can you please make an issue out of it ? With your use-case. It will help prioritizing the work ๐Ÿ˜‡

#

PS: thanks for the rephrasing ๐Ÿ™

hearty heron
#

No worries, thank you for quick response. Sure I'll create an issue

midnight sierra
#

This is similar to the buildpack use case

midnight sierra
#

Basically there are 3 possible approaches:

1: connect to an external docker engine: by unix socket as discussed here (not yet implemented but coming soon) or by ssh

2: fork goreleaser to call dagger API instead of docker API. This is the most robust solution long term but obviously there is non-trivial work initially

  1. implement a proxy that translates docker engine API calls to dagger engine API calls. This should not be too much work butโ€ฆ still not trivial

Hope this helps

#

cc @thorny ginkgo @restive fern @crude plover ๐Ÿ‘† (not urgent)

hearty heron
#

Other than this goreleaser workflow in our CI or Local environment we need to heavily rely on docker like KinD clusters. I guess most feasible approach is connecting external docker engine as you mentioned option 1.

#

It's great to hear it'll be coming soon.

#

Please let me know if you need extra contributor for adding this feature faster ๐Ÿ˜„

midnight sierra
#

@hearty heron one thing that would be super helpful would be filing an issue on github, explaining the feature you need and why. It doesnโ€™t have to be long or complete. itโ€™s easier to prioritize a feature when everyone sees that actual users want it ๐Ÿ™‚

hearty heron
#

@midnight sierra sure definitely will do it

hearty heron