Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerised or containerised fabric #845

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fahadshery
Copy link

What this Pull Request (PR) does

I added the docker folder with the required DockerFile etc. to containerise fabric application.

Related issues

closes #327.

@danielmiessler
Copy link
Owner

@xssdoctor what do you think on this one?

Added a section on how to get inside the running container and update the patterns
docker/README.md Outdated Show resolved Hide resolved
@bijeebuss
Copy link

+1 on this. This allows me to run this without installing a bunch of stuff on my computer

@bijeebuss
Copy link

actually apparently I can just do this and it saves the install of fabic

alias gocontainer='docker run -it --pull always --rm -v $HOME:/root -v $(pwd):/go -w /go golang:latest'

fixed type when running the container
Copy link

@nloadholtes nloadholtes Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick note: following the instructions in the README.md did not work on an ubuntu system: the dockerfile is named DockerFile but my docker was looking for Dockerfile. (Running with -f DockerFile let it build, but most dockerfiles I've seen only have the D capitalized.)

Thank you for making this PR!

@eugeis
Copy link
Collaborator

eugeis commented Aug 29, 2024

Thank you for the PR.

Please also check those 3 points.

  1. Docker image for production
    Your image will work for sure. The best practice for production is to use small Docker images that contain only the application itself, without any unnecessary dependencies. To run Fabric, we don't need the Go development environment; we only need the binary. To create such an image, a multi-stage Dockerfile is typically used. Please check the example here and adapt the Dockerfile accordingly.
  1. Please clean up docker-compose file. Remove all commented out lines and the traefic network.

  2. Please add Github Action to build and publish Docker image to Github Registry, see e.g. here

@danielmiessler
Copy link
Owner

Love it.

@fahadshery
Copy link
Author

  1. Please add Github Action to build and publish Docker image to Github Registry, see e.g. here

Hi,

Thanks for the suggestions. I can look into point 1 and 2.
But for point 3 I think it's better if @danielmiessler would publish the image on dockerhub himself. it would also confirm that the docker image is officially supported.

@brauliodiasribeiro
Copy link

Someone help me install Fabric AI in a docker on Unraid?
I don't know how to build this docker in Unraid because it asks for the image path.

@yousecjoe
Copy link

Someone help me install Fabric AI in a docker on Unraid? I don't know how to build this docker in Unraid because it asks for the image path.

It would be best to learn to build the image yourself. Unless I am mistaken, based on reading this PR, you still need to build the image for yourself because the choice to automate the build and upload to GHCR was pushed back on the core dev, and then there was some confusing statement about using Docker Hub instead of the proposed GHCR.

In summary, there's a missing step and more work needs to be done and there is some confusion between two people as to where to upload the image after it's built.

@brauliodiasribeiro
Copy link

Someone help me install Fabric AI in a docker on Unraid? I don't know how to build this docker in Unraid because it asks for the image path.

It would be best to learn to build the image yourself. Unless I am mistaken, based on reading this PR, you still need to build the image for yourself because the choice to automate the build and upload to GHCR was pushed back on the core dev, and then there was some confusing statement about using Docker Hub instead of the proposed GHCR.

In summary, there's a missing step and more work needs to be done and there is some confusion between two people as to where to upload the image after it's built.

I don't have the knowledge to do this. I'll study more and follow the forum. Thanks for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants