From b67d392fff78a10ace2e1d5419e67cea5089f673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 8 Jan 2024 17:26:53 +0100 Subject: [PATCH 1/7] switch base image to "pandoc/extra" --- src/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Dockerfile b/src/Dockerfile index c9180e1..10600f7 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -1,9 +1,12 @@ -FROM ldericher/pandocker:latest +FROM pandoc/extra:latest RUN set -ex; \ - apt-get update && apt-get -y install \ + \ + apk add --no-cache \ + bash \ inotify-tools \ - ; rm -rf /var/lib/apt/lists/*; + make \ + ; COPY usr /usr From b2d93d72836c6daf96aab6c9b9e1ef266d998aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 8 Jan 2024 17:34:51 +0100 Subject: [PATCH 2/7] slight change to example --- examples/simple md/simple.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/simple md/simple.md b/examples/simple md/simple.md index 8f8c5f1..fd3dfc2 100644 --- a/examples/simple md/simple.md +++ b/examples/simple md/simple.md @@ -15,7 +15,7 @@ Behold, for there is jumbled mess ahead! With the default HTML template, this does not translate: \textsl{Have some \LaTeX, too!} Some math is fine with HTML: $x=5$, some other is not: $\sqrt{x}=2$. -However, both of these are fixable! +However, both of these work with the `--webtex` switch for pandoc! Code blocks? Sure! From 9103180c3619aafc1c76b347b690eaadbbf5ba2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 8 Jan 2024 18:24:50 +0100 Subject: [PATCH 3/7] remove root compose file for a Makefile; move Dockerfile; adjust drone file --- .drone.yml | 2 -- src/Dockerfile => Dockerfile | 5 +++-- Makefile | 24 ++++++++++++++++++++++++ docker-compose.yml | 16 ---------------- 4 files changed, 27 insertions(+), 20 deletions(-) rename src/Dockerfile => Dockerfile (70%) create mode 100644 Makefile delete mode 100644 docker-compose.yml diff --git a/.drone.yml b/.drone.yml index 876d85d..a5119a0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,8 +7,6 @@ steps: image: plugins/docker settings: repo: ldericher/autodoc - context: src - dockerfile: src/Dockerfile auto_tag: true username: from_secret: DOCKER_USERNAME diff --git a/src/Dockerfile b/Dockerfile similarity index 70% rename from src/Dockerfile rename to Dockerfile index 10600f7..0933772 100644 --- a/src/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ RUN set -ex; \ make \ ; -COPY usr /usr +COPY src/usr /usr -CMD ["autodoc", "-bw"] +ENTRYPOINT ["autodoc"] +CMD ["-bw"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c3e0c78 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +image_tag = ldericher/autodoc +docker_build = docker build +docker_run = docker run --rm -it +examples_flags = -v "$(shell pwd)/examples:/data" -u "$(shell id -u):$(shell id -g)" + +.PHONY: default +default: + $(info use other targets: image build watch clean) + +.PHONY: image +image: + $(docker_build) --tag $(image_tag) ./ + +.PHONY: build +build: image + $(docker_run) $(examples_flags) $(image_tag) -b + +.PHONY: watch +watch: image + $(docker_run) $(examples_flags) $(image_tag) + +.PHONY: clean +clean: + git clean -xdf ./examples \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 7f5fb2e..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: "2" - -services: - autodoc: - restart: "no" - - image: ldericher/autodoc - build: - context: ./src - - command: "bash" - - volumes: - - "${PWD}/src/usr/local/bin/autodoc:/usr/local/bin/autodoc:ro" - - "${PWD}/src/usr/local/lib/autodoc:/usr/local/lib/autodoc:ro" - - "${PWD}/examples:/docs" From 7cc5d4a2c493f613e2ea4a3208a6ddb2155281bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 8 Jan 2024 22:40:05 +0100 Subject: [PATCH 4/7] "eisvogel" example --- examples/eisvogel/.gitignore | 1 + examples/eisvogel/Makefile | 8 ++++++++ examples/eisvogel/document.md.url | 1 + 3 files changed, 10 insertions(+) create mode 100644 examples/eisvogel/.gitignore create mode 100644 examples/eisvogel/Makefile create mode 100644 examples/eisvogel/document.md.url diff --git a/examples/eisvogel/.gitignore b/examples/eisvogel/.gitignore new file mode 100644 index 0000000..a136337 --- /dev/null +++ b/examples/eisvogel/.gitignore @@ -0,0 +1 @@ +*.pdf diff --git a/examples/eisvogel/Makefile b/examples/eisvogel/Makefile new file mode 100644 index 0000000..24b0fe1 --- /dev/null +++ b/examples/eisvogel/Makefile @@ -0,0 +1,8 @@ +#%SRCPAT% \.url$ + +.PHONY: all +all: eisvogel.pdf + +.PHONY: eisvogel.pdf +eisvogel.pdf: document.md.url + wget -O- '$(file < $<)' | pandoc -s -f markdown -t latex -o $@ --template eisvogel diff --git a/examples/eisvogel/document.md.url b/examples/eisvogel/document.md.url new file mode 100644 index 0000000..08edf3e --- /dev/null +++ b/examples/eisvogel/document.md.url @@ -0,0 +1 @@ +https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/master/examples/basic-example/document.md From da0c61dd924502312262a095602faf46db84ac6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 8 Jan 2024 22:40:36 +0100 Subject: [PATCH 5/7] "make shell" --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c3e0c78..209d2e8 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ examples_flags = -v "$(shell pwd)/examples:/data" -u "$(shell id -u):$(shell id .PHONY: default default: - $(info use other targets: image build watch clean) + $(info use other targets: image build watch shell clean) .PHONY: image image: @@ -19,6 +19,10 @@ build: image watch: image $(docker_run) $(examples_flags) $(image_tag) +.PHONY: shell +shell: image + $(docker_run) $(examples_flags) --entrypoint ash $(image_tag) + .PHONY: clean clean: git clean -xdf ./examples \ No newline at end of file From 5ee2197f18cc7503f58072fe0f389e49909c4e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 8 Jan 2024 22:46:08 +0100 Subject: [PATCH 6/7] use /docs instead of /data --- Dockerfile | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0933772..8bac3cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,5 +10,6 @@ RUN set -ex; \ COPY src/usr /usr +WORKDIR /docs ENTRYPOINT ["autodoc"] CMD ["-bw"] diff --git a/Makefile b/Makefile index 209d2e8..de98246 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ image_tag = ldericher/autodoc docker_build = docker build docker_run = docker run --rm -it -examples_flags = -v "$(shell pwd)/examples:/data" -u "$(shell id -u):$(shell id -g)" +examples_flags = -v "$(shell pwd)/examples:/docs" -u "$(shell id -u):$(shell id -g)" .PHONY: default default: From ea086a6a3a5a5b1a983464286e7a722543085aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 8 Jan 2024 22:48:12 +0100 Subject: [PATCH 7/7] update documentation --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cf32205..f5f8f0e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ In general, any file-sharing solution -- preferably on top of `docker-compose` - ## Quick Start Guide using Docker -The `autodoc` image [available on Docker Hub](https://hub.docker.com/r/ldericher/autodoc) is based on [pandocker](https://hub.docker.com/r/ldericher/pandocker) providing Ubuntu's TeXlive `LaTeX` and `pandoc` in a simple box. +The `autodoc` image [available on Docker Hub](https://hub.docker.com/r/ldericher/autodoc) is based on [pandoc/extra](https://hub.docker.com/r/pandoc/extra) providing TeXlive `LaTeX` and `pandoc` in a container. 01. Install [Docker CE](https://docs.docker.com/install/) @@ -18,7 +18,7 @@ The `autodoc` image [available on Docker Hub](https://hub.docker.com/r/ldericher ```bash docker run --rm -it \ - --volume "${PWD}":/docs \ + --volume "${PWD}:/docs" \ --user "$(id -u):$(id -g)" \ ldericher/autodoc ``` @@ -58,7 +58,6 @@ services: - documents:/opt/autodoc autodoc: - restart: always image: ldericher/autodoc user: "UID:GID" volumes: