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

Add docker usage in README #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexandregv
Copy link

Just a quick PR to add a simple docker usage in the README.
It allows to run primitive without installing Go and primitive itself.

I was thinking to create a Dockerfile and maybe push the image on the DockerHub, but I though a simple one-liner would be enough since installing primitive in the base golang image is really quick.
Let me know what you think about it.

@laurenceforshaw
Copy link

This seems useful.

@alexandregv
Copy link
Author

alexandregv commented May 4, 2020

What solution is better in your oponion ?

  • A simple one-liner, usable without even having to clone the repo
docker run -v ${PWD}:/tmp golang sh -c 'go get -u github.com/fogleman/primitive; primitive -i /tmp/input.png -o /tmp/output.png -n 100'`
  • A Dockerfile, having to clone the repo and build the image
git clone https://github.com/fogleman/primitive.git
cd primitive
docker build -t primitive .
docker run -v ${PWD}:/tmp primitive -i /tmp/input.png -o /tmp/output.png -n 100
  • The same Dockerfile, but with image published on the DockerHub, allowing users to run it directly
docker run -v ${PWD}:/tmp fogleman/primitive -i /tmp/input.png -o /tmp/output.png -n 100

Currently I only edited the README to include the first one-liner.
The "standard" way is the second, and the best for end-users is the third.

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.

2 participants