danielmiessler / fabric

fabric is an open-source framework for augmenting humans using AI. It provides a modular framework for solving specific problems using a crowdsourced set of AI prompts that can be used anywhere.
https://danielmiessler.com/p/fabric-origin-story
MIT License
25.61k stars 2.73k forks source link

[Feature request]: Dockerfile #275

Open gwpl opened 8 months ago

gwpl commented 8 months ago

What do you need?

Kind request for Dockerfile (ideally based on some clean or hardened or widely used docker image) to make it easy to build (with docker build or `docker buildx) and run and eventually compose (with other docker images via docker-compose/podman-compose).

tangowithfoxtrot commented 3 months ago

Now that this project is built in Go, producing a Docker image for this is as simple as running kobuild in the repo root. Doing so produces a statically-linked Go binary inside of a reasonably hardened Docker image.

gwpl commented 3 months ago

Thank you! I didn't know that Go projects need just ko build to make a docker image!

maxolasersquad commented 3 months ago

Is there any objection to this project having a Dockerfile? I'm willing to do the work to make it happen.

maxolasersquad commented 3 months ago

Looking into this a bit, some changes are needed for this containerize properly. For example, during the build process, it needs to init the patterns, but --setup wants to initialize the API keys. This is not appropriate during the build process. So we need a way to init the patterns without configuring the keys. I've created a new flag for that, but it's failing somewhere while creating the patterns.

That's just to say, I believe there's work to do to make containerizing this properly work correctly.

dennislwm commented 2 months ago

I've created a Dockerfile for my own project; it's not perfect but it works.

You could modify it to have ARGs, so that it can be used by other projects.

https://github.com/dennislwm/playscholar