asciidoctor / docker-asciidoctor

:ship: A Docker image for using the Asciidoctor toolchain to process AsciiDoc content
https://hub.docker.com/r/asciidoctor/docker-asciidoctor/
Other
321 stars 151 forks source link

feat: add ASCIIToSVG (a2s binary) to container image. #372

Closed k-wall closed 11 months ago

k-wall commented 1 year ago

Fix #371.

k-wall commented 1 year ago

Test cases added now too:

kwall@Oslo docker-asciidoctor % export IMAGE_NAME=docker.io/asciidoctor/docker-asciidoctor
kwall@Oslo docker-asciidoctor % bats tests
 ✗ We can generate an HTML document with a diagram with asciidoctor-diagram as backend
   (in test file tests/asciidoctor.bats, line 154)
     `[ "$(echo ${output} | grep -c -i error)" -eq 0 ]' failed
   -- Output of command:
   Trying to pull docker.io/asciidoctor/docker-asciidoctor:latest...
   Getting image source signatures
   Copying blob sha256:56782d0530714adc62ae576e85116d4dda40912cfe97f62e81c2a2627d79da37
   Copying blob sha256:31e352740f534f9ad170f75378a84fe453d6156e40700b882d737a8f4a6988a3
   Copying blob sha256:ca25e8f85fd11c124a1401de1836343fea29f976924d1517201a4302f7932c14
   Copying blob sha256:8d9db96ef65be24a4fd269bc9cce32c3b051e75c86a05e0363f84803f7ffde02
   Copying blob sha256:aae430c7a9ece80aa0cdb3fbf9d2f60df80458d4f55e40577bb174945888e9b7
   Copying blob sha256:051b8c71077c967b14c39eac415a72e9ec18d2b81a8e546897f793651be9557a
   Copying blob sha256:a488ac73979d6f2b11679a5094601ed1e21fa06ccc4a2e599fd507900be2f96c
   Copying blob sha256:565ef0a8bb3b7a1103e77c916ed9ce2f2d3659b2a4179e66ccd95f1c3a8607ec
   Copying config sha256:7b6c7a7174cf3b13e4cea5280e15451f75b71a7aed9d52a93abb1b69038152fa
   Writing manifest to image destination
   Storing signatures
   asciidoctor: ERROR: sample-with-diagram.adoc: line 57: Failed to generate image: Could not find the 'a2s' executable in PATH; add it to the PATH or specify its location using the 'a2s' document attribute
   --

1 test, 1 failure
kwall@Oslo docker-asciidoctor % export IMAGE_NAME=quay.io/k_wall/docker-asciidoctor:latest
kwall@Oslo docker-asciidoctor %
kwall@Oslo docker-asciidoctor %
kwall@Oslo docker-asciidoctor % bats tests
 ✓ We can generate an HTML document with a diagram with asciidoctor-diagram as backend

1 test, 0 failures
k-wall commented 1 year ago

Push an update in response to this comment:

In https://github.com/k-wall/docker-asciidoctor/commit/d14a84deedfbf49ab83e61dea3dfa3ed465a2ab0#r120679120 @barthel said:

Use the same Alpine version as the Asciidoctor image here would be more safe. See: https://github.com/barthel/docker-asciidoctor/blob/3f41f7f1d10a9a6face36ee436aefff9781f35eb/Dockerfile#L5

k-wall commented 12 months ago

Any feedback on this PR would be appreciated.