diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..93af876 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +# Simple base dockerfile to simplify its usage without need to have node locally. +FROM node:alpine + +RUN npm install -g svg-term-cli + +ENTRYPOINT [ "svg-term" ] diff --git a/README.md b/README.md index a36b68e..d65a1bb 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,18 @@ Generate the `parrot.svg` example from [asciicast](https://asciinema.org/a/11364 svg-term --cast=113643 --out examples/parrot.svg --window ``` +### Docker + +Skip the node installation running with docker: + +```sh +docker run --rm marionebl/svg-term --cast=113643 --window >> examples/parrot.svg +# Run with --interactive(-i) to keep STDIN open +cat rec.json | docker run --rm -i marionebl/svg-term >> examples/parrot.svg +# Map volumes to have a better log if any error +docker run --rm -v $PWD:/data marionebl/svg-term --cast=113643 --out /data/parrot.svg --window +``` + ## Interface ```