widdershins icon indicating copy to clipboard operation
widdershins copied to clipboard

Dockerfile introduced

Open typekpb opened this issue 3 years ago • 12 comments

typekpb avatar Nov 05 '20 11:11 typekpb

Thanks for the PR. The Dockerfile looks a little generic to me (though I'm no expert). Wouldn't we need to expose a volume mapping so people can specify the input file and get at the output?

MikeRalphson avatar Nov 05 '20 11:11 MikeRalphson

you're right, but usage is kind of case-specific. For example, if I follow the official Example, it could be done like:

docker run -it --rm -v ${PWD}:/usr/src/app/petstore3.json:ro -v ${PWD}/md/:/usr/src/app/md/ widdershins:latest /bin/sh -c "node widdershins /usr/src/app/petstore3.json --search false --language_tabs 'ruby:Ruby' 'python:Python' --summary -o /usr/src/app/md/petstore3.html.md"

typekpb avatar Nov 05 '20 11:11 typekpb

I think we would need an example added to either the README.md, a docs/docker.md file or the wiki...

Can I ask (I know I'm biased) but why use Docker to run node.js programs at all? It's very easy to install node on every platform I've ever tried it on...

MikeRalphson avatar Nov 05 '20 11:11 MikeRalphson

README.md file updates provided (with TODOs for dockerhub org/link)

why docker? because then docker is the only dependency we need to install to our documentation pipeline. And widdershins is not the only tool we use. And we don't need to care about the updates as docker pull does the job

typekpb avatar Nov 05 '20 11:11 typekpb

Thanks for the PR. The Dockerfile looks a little generic to me (though I'm no expert). Wouldn't we need to expose a volume mapping so people can specify the input file and get at the output?

I would discourage specifying a volume in the Dockerfile. It's trivial to document that a volume could be used (via CLI or whatever), but specifying a volume in the Dockerfile itself can result in volume leaking if anyone inherits from this docker image and specifies their own volumes. Docker currently doesn't allow you to remove volumes from base images despite a long running issue asking for that behavior.

jalaziz avatar Nov 13 '20 21:11 jalaziz

@MikeRalphson any chance to get this one processed?

typekpb avatar Nov 13 '20 22:11 typekpb

@typekpb sorry, yes, don't see why not, but do we need a .dockerignore file to prevent copying any existing node_modules or .git directories into the image?

MikeRalphson avatar Nov 20 '20 11:11 MikeRalphson

@MikeRalphson .dockerignore introduced

typekpb avatar Nov 23 '20 00:11 typekpb

seems to have low prio, right?

typekpb avatar Mar 04 '21 10:03 typekpb

Sorry no, it will be included in the next release, but the features for that are still being worked on.

MikeRalphson avatar Mar 04 '21 10:03 MikeRalphson

Is this still on the roadmap ?

adrianlungu avatar Mar 03 '22 23:03 adrianlungu

@MikeRalphson will this be added as a feature soon? I'd really appreciate having the Dockerfile added as it would make certain build pipelines easier. Thank you for the awesome stuff you've built.

steveannett avatar Jun 05 '23 03:06 steveannett