Fabric
Fabric copied to clipboard
[Feature request]: Dockerfile
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).
Now that this project is built in Go, producing a Docker image for this is as simple as running ko build in the repo root. Doing so produces a statically-linked Go binary inside of a reasonably hardened Docker image.
Thank you! I didn't know that Go projects need just ko build to make a docker image!
Is there any objection to this project having a Dockerfile? I'm willing to do the work to make it happen.
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.
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
Feel free to use my Docker image. Basically it starts from the official golang image, adds npm, installs fabric and its web ui and then launches fabric --serve as well as the web ui. It is reachable then with http://container:5173. Maybe it helps someone…
https://github.com/coolmast/docker-fabric-web https://hub.docker.com/r/coolmast/fabric
The current Docker setup is broken as of the repo organization. I will fix the issue soon. Closing this and tracking in #1683