Skip to content

Commit

Permalink
Clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Mokolea committed May 24, 2019
1 parent 7679068 commit c1f0b56
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

FROM haskell

LABEL version="1.1.0"
LABEL version="1.1.1"
LABEL maintainer="Mario Ban <[email protected]>"

# Install additional packages
Expand Down Expand Up @@ -50,7 +50,7 @@ USER docker:docker
# Aliases
RUN sed -i -e 's/#force_color_prompt=yes/force_color_prompt=yes/' -e 's/#alias l/alias l/' /home/docker/.bashrc

# Install pandoc (pandoc-2.3.1 or current pandoc 2.5)
# Install pandoc (current pandoc 2.7.2)
RUN cabal update && \
cabal install pandoc

Expand All @@ -67,4 +67,3 @@ ENTRYPOINT ["/bin/bash"]

#ENTRYPOINT ["pandoc"]
#CMD ["--help"]

28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docker-pandoc [![Size](https://img.shields.io/microbadger/image-size/mokolea/pandoc.svg)](https://hub.docker.com/r/mokolea/pandoc) [![Layers](https://img.shields.io/microbadger/layers/mokolea/pandoc.svg)](https://hub.docker.com/r/mokolea/pandoc)

Test markdown using pandoc v2.5
Test markdown using pandoc v2.7.n

[![Release](https://img.shields.io/github/release/Mokolea/docker-pandoc.svg)](https://github.com/Mokolea/docker-pandoc/releases)

Expand All @@ -12,27 +12,29 @@ Test markdown using pandoc v2.5
- https://github.com/jgm/pandoc

## Usage
- Start container from current markdown-project directory: `$ docker run -it -v $(pwd):/data --name pandoc25 -h pandoc25 mokolea/pandoc:latest`
- Optional: Set user and group IDs to override the default user: `$ docker run -it -v $(pwd):/data -u $(id -u):$(id -g) --name pandoc25 -h pandoc25 mokolea/pandoc:latest`
- Subsequent use of the same container: `$ docker start -ai pandoc25`
- Start bash shell in the already running container: `$ docker exec -it pandoc25 bash`
- Start container from current markdown-project directory: `$ docker run -it -v $(pwd):/data --name pandoc -h pandoc mokolea/pandoc:latest`
- Optional: Set user and group IDs to override the default image user (1000:1000) by using parameter:
- `-u root` for root user
- `-u $(id -u):$(id -g)` for current host user (experimental - does not work without additional configuration)
- Subsequent use of the same container: `$ docker start -ai pandoc`
- Start bash shell in the already running container: `$ docker exec -it pandoc bash`

## Test
```
root@pandoc25:/data# pandoc --version
pandoc 2.5
Compiled with pandoc-types 1.17.5.4, texmath 0.11.1.2, skylighting 0.7.5
Default user data directory: /root/.pandoc
Copyright (C) 2006-2018 John MacFarlane
docker@pandoc:/data$ pandoc --version
pandoc 2.7.2
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.7.7
Default user data directory: /home/docker/.local/share/pandoc or /home/docker/.pandoc
Copyright (C) 2006-2019 John MacFarlane
Web: http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
root@pandoc25:/data#
docker@pandoc:/data$
root@pandoc25:/data# pandoc -o hello-world.pdf hello-world.md
docker@pandoc:/data$ pandoc -o hello-world.pdf hello-world.md
root@pandoc25:/data# pandoc -s -o hello-world.html hello-world.md --metadata pagetitle="hello-world"
docker@pandoc:/data$ pandoc -s -o hello-world.html hello-world.md --metadata pagetitle="hello-world"
```

## TODO
Expand Down

0 comments on commit c1f0b56

Please sign in to comment.