Skip to content

Commit

Permalink
Merge pull request ekalinin#66 from vemonet/master
Browse files Browse the repository at this point in the history
Add Dockerfile to run it from Docker
  • Loading branch information
ekalinin authored Mar 23, 2019
2 parents c9005b3 + f25e277 commit 25a094c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM debian

RUN apt update -y && \
apt upgrade -y && \
apt install curl -y

WORKDIR app

COPY gh-md-toc .

RUN chmod +x gh-md-toc

ENTRYPOINT ["./gh-md-toc"]
CMD []
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,25 @@ Dependency
* bats (for unit tests)
Tested on Ubuntu 14.04/14.10 in bash/zsh.
Docker
==========
* Build
```shell
docker build -t markdown-toc-generator .
```
* Run on an URL
```shell
docker run -it markdown-toc-generator https://github.com/ekalinin/envirius/blob/master/README.md
```
* Run on a local file (need to share volume with docker)
```shell
docker run -it -v /data/ekalinin/envirius:/data markdown-toc-generator /data/README.md
```

0 comments on commit 25a094c

Please sign in to comment.