From de600eb910b41b776872eb02428115cb50bd4d47 Mon Sep 17 00:00:00 2001 From: Andrew Beveridge Date: Tue, 5 Mar 2024 21:22:51 -0600 Subject: [PATCH] Updated dockerfile to make it easier to run as a cli tool --- Dockerfile | 7 +++++-- README.md | 11 ++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb51c94..b7a9b7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,8 @@ WORKDIR /app # Install the logo-diagram-generator package RUN pip install logo-diagram-generator -# Set the default command to run the logo-diagram-generator -CMD ["logo-diagram-generator"] +# Configure docker to run the logo-diagram-generator +ENTRYPOINT ["logo-diagram-generator"] + +# Set the default args to pass if none are specified +CMD [ "--help" ] diff --git a/README.md b/README.md index a8e6f8b..9ff983c 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,8 @@ This package, `logo-diagram-generator`, allows you to generate SVG diagrams that Here's an example of a diagram generated using `logo-diagram-generator`, based on an example configuration: -``` -pip install logo-diagram-generator -logo-diagram-generator -c examples/full.example.yml -o examples -n full.example +```bash +docker run -it -v `pwd`:/app beveradb/logo-diagram-generator -c examples/full.example.yml ``` ![Example Diagram](examples/full.example_logos.svg) @@ -26,6 +25,12 @@ logo-diagram-generator -c examples/full.example.yml -o examples -n full.example pip install logo-diagram-generator ``` + **🐳 Alternately, use Docker and skip to step 3! 🎉** + ```bash + docker run -it -v `pwd`:/app beveradb/logo-diagram-generator + ``` + If you use Docker, you don't need to install anything on your system as the tool runs in a container. + 2. **Install Graphviz** This tool uses [Graphviz](https://graphviz.org/) to render the graph, so you need the graphviz binaries installed on your system for this to work.