Skip to content

Commit 25a094c

Browse files
authored
Merge pull request #66 from vemonet/master
Add Dockerfile to run it from Docker
2 parents c9005b3 + f25e277 commit 25a094c

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM debian
2+
3+
RUN apt update -y && \
4+
apt upgrade -y && \
5+
apt install curl -y
6+
7+
WORKDIR app
8+
9+
COPY gh-md-toc .
10+
11+
RUN chmod +x gh-md-toc
12+
13+
ENTRYPOINT ["./gh-md-toc"]
14+
CMD []

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,3 +366,25 @@ Dependency
366366
* bats (for unit tests)
367367
368368
Tested on Ubuntu 14.04/14.10 in bash/zsh.
369+
370+
Docker
371+
==========
372+
373+
* Build
374+
375+
```shell
376+
docker build -t markdown-toc-generator .
377+
```
378+
379+
* Run on an URL
380+
381+
```shell
382+
docker run -it markdown-toc-generator https://github.com/ekalinin/envirius/blob/master/README.md
383+
```
384+
385+
* Run on a local file (need to share volume with docker)
386+
387+
```shell
388+
docker run -it -v /data/ekalinin/envirius:/data markdown-toc-generator /data/README.md
389+
```
390+

0 commit comments

Comments
 (0)