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 ed4e201 commit 83eee68
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ FROM mokolea/pandoc
LABEL version="1.1.0"
LABEL maintainer="Mario Ban <[email protected]>"

# Set user to use
USER root

# Install additional packages
RUN apt-get update -y && \
apt-get install -y -o Acquire::Retries=10 \
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,28 @@ Test AsciiDoc (includes [pandoc](https://hub.docker.com/r/mokolea/pandoc))

## Usage
- Start container from current asciidoc-project directory: `$ docker run -it -v $(pwd):/data --name asciidoc -h asciidoc mokolea/asciidoc:latest`
- Optional: Set user and group IDs to override the default user: `$ docker run -it -v $(pwd):/data -u $(id -u):$(id -g) --name asciidoc -h asciidoc mokolea/asciidoc: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 asciidoc`
- Start bash shell in the already running container: `$ docker exec -it asciidoc bash`

## Test
```
root@asciidoc:/data# asciidoc --version
docker@asciidoc:/data$ asciidoc --version
asciidoc 8.6.9
root@asciidoc:/data#
docker@asciidoc:/data$
root@asciidoc:/data# docbook2pdf --version
docker@asciidoc:/data$ docbook2pdf --version
DocBook-utils version 0.6.14 (jw version 1.1)
root@asciidoc:/data#
docker@asciidoc:/data$
root@asciidoc:/data# asciidoc -b docbook hello-world.adoc && docbook2pdf hello-world.xml
docker@asciidoc:/data$ asciidoc -b docbook hello-world.adoc && docbook2pdf hello-world.xml
Using catalogs: /etc/sgml/catalog
Using stylesheet: /usr/share/docbook-utils/docbook-utils.dsl#print
Working on: /data/hello-world.xml
Done.
root@asciidoc:/data#
docker@asciidoc:/data$
```

## TODO
Expand Down

0 comments on commit 83eee68

Please sign in to comment.