From f913091b606faa9f20719b207b58ce8f85b69c06 Mon Sep 17 00:00:00 2001 From: oupala Date: Tue, 23 Aug 2016 15:30:02 +0200 Subject: [PATCH] Set default working directory to /slides in Docker image Set the working directory to /slides so that the PDF file does not need to be prefixed by using this convention. --- Dockerfile | 4 +++- README.adoc | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 45fa894..e623b2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,5 +26,7 @@ RUN curl -k \ RUN chmod +x bin/phantomjs -ENTRYPOINT ["/decktape/bin/phantomjs", "decktape.js"] +WORKDIR /slides + +ENTRYPOINT ["/decktape/bin/phantomjs", "/decktape/decktape.js"] CMD ["-h"] diff --git a/README.adoc b/README.adoc index adb667d..85ee6ec 100644 --- a/README.adoc +++ b/README.adoc @@ -263,15 +263,15 @@ For example: * To convert an online HTML presentation and have it exported into the working directory under the `slides.pdf` filename: [source,shell,subs=attributes+] - $ docker run --rm -v `pwd`:/pwd astefanutti/decktape {uri-revealjs} /pwd/slides.pdf + $ docker run --rm -v `pwd`:/slides astefanutti/decktape {uri-revealjs} slides.pdf * Or, to convert an HTML presentation that's stored on the local file system in the `home` directory: [source,shell] - $ docker run --rm -v `pwd`:/pwd -v ~:/home astefanutti/decktape /home/slides.html /pwd/slides.pdf + $ docker run --rm -v `pwd`:/slides -v ~:/home/user astefanutti/decktape /home/user/slides.html slides.pdf * Or, to convert an HTML presentation that's deployed on the local host: [source,shell] - $ docker run --rm --net=host -v `pwd`:/pwd astefanutti/decktape http://localhost:8000 /pwd/slides.pdf + $ docker run --rm --net=host -v `pwd`:/slides astefanutti/decktape http://localhost:8000 slides.pdf It is recommended to use the following options from the {uri-docker-ref}/run[`docker run`] command: