Giter VIP home page Giter VIP logo

docker-asciidoctor's People

Contributors

abelsromero avatar aledomu avatar asciidoctor-updateclibot[bot] avatar barthel avatar cexbrayat avatar dduportal avatar dependabot[bot] avatar github-actions[bot] avatar gounthar avatar gscheibel avatar hakandilek avatar hasalex avatar jeromeag avatar juracy avatar k-wall avatar miyoshi-ryota avatar mojavelinux avatar mskyaxl avatar obilodeau avatar reitzig avatar roelvs avatar sapientpants avatar shivakumargn avatar slauth avatar slonopotamus avatar spkane avatar stoeps13 avatar syndlex avatar tarikgraba avatar yoonghm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-asciidoctor's Issues

asciidoctor-mathematical Missing fonts

Hi, thanks for this docker image.

It appears that some fonts are missing from the image.

Using the following asciidoc:

= Precompiled Math
:math:
:imagesoutdir: generated_images
:imagesdir: images
:stem: latexmath

== Equations in normal blocks

[latexmath]
++++
k_{n+1} = n^2 + k_n^2 - k_{n-1}
++++

Some useful text! Formula for quadratic root:

[latexmath]
++++
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
++++

Then run the command (inside the running container):

asciidoctor-pdf -r asciidoctor-mathematical -o test.pdf test.adoc

The pdf renders the sqrt symbol incorrectly. (Similar to this issue: gjtorikian/mathematical#79)

Are the fonts included ok?

screen shot 2017-11-07 at 12 49 48

Update:

I've just found a docker container that works: rochdev/alpine-asciidoctor:plus

Distorted labels with asciidoctor-diagrams

I noticed that the diagrams rendered by Asciidoctor-diagram are slightly distorted. Labels are slightly to wide.

I'll include a sample diagram build with this image and a render from MacOS for comparison.

SVGs.zip

If I choose PNG output the text seems to get rendered with a monospace font, which might explain why Graphviz thinks the label should be wider.

Deployment-correct

Deployment-distorted

Are we missing some dependency or font for Graphviz?

docker image's docker-asciidoctor failing to talking to https based confluence server

asciidoctor-confluence SSL issues

Friends:

Thank you in advance for your time and attention.

I am trying to use the docker image for asciidoctor, specifically the asciidoctor-confluence.

I tried the following

HOST=https://conf.es.ak.azz.com
SPACEKEY=MDRD
TITLE="First Test"
USERNAME=zulu
PASSWORD=zebra

docker run -it -v $(pwd):/documents/ asciidoctor/docker-asciidoctor
asciidoctor-confluence --host $HOST --spaceKey $SPACEKEY --title $TITLE
--username $USERNAME --password $PASSWORD adoc_tester.adoc

When I ran this I saw the following error.

An error occurred, the page has not been created because:
SSL_connect SYSCALL returned=5 errno=0 state=SSLv3/TLS write client hello

I did some research it looks like the https related libraries are not baked in for https end points specfically the SSL V3 is not available inside the image.

Can I get some help on how to solve it or the docker image be upgraded to use SSL3 ?

Thank you once again for your time and attention.

-Narahari

Rename image in Docker Hub to asciidoctor/asciidoctor

Currently, the image in the Docker register is asciidoctor/docker-asciidoctor. This name is not consistent with how other Docker images are named. Since this is the official Docker image for Asciidoctor, the name should be asciidoctor/asciidoctor. Let's change it.

We might even want to see if we can become an official image, so we get the name "asciidoctor" all by itself (like ruby). But that might be a next step after resolving the topic at hand.

Failed to generate slides

With this slide.adoc file :

= DZSlides Demo
Your Name
:backend: dzslides
:dzslides-style: stormy
:dzslides-transition: fade
:dzslides-fonts: family=Yanone+Kaffeesatz:400,700,200,300&family=Cedarville+Cursive
:dzslides-highlight: monokai

source-highlighter: highlightjs

[.topic.intro]
== Intro

== !

*Title*

== !

[.incremental]
* dzslides
* deckjs

[.topic.source]
== Source

[source,ruby]
--
puts 'Hello, World!'
--

[.topic.ending]
== Fin!

I try to generate HTML, i've got an error :

$ git clone https://github.com/mojavelinux/dzslides.git
$ git clone https://github.com/mojavelinux/asciidoc-dzslides-backend.git dzslides
$ docker run --rm=true -it -v `pwd`:/documents/ asciidoctor/docker-asciidoctor asciidoctor -T asciidoctor-backends/slim/dzslides/ slides.adoc
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
Format :html5 is deprecated, use :html
asciidoctor: FAILED: /documents/slides.adoc: Failed to parse source, /documents/asciidoctor-backends/slim/dzslides/README.adoc is not valid US-ASCII
  Use --trace for backtrace

Add prawn-gmagick gem

The prawn-gmagick gem is a drop-in replacement for the image processing in Asciidoctor PDF that uses GraphicsMagick under the covers. It has the benefit of making PDF conversion of documents containing images substantially faster. Image decoding in pure Ruby is quite slow, so this gem delegates the work to GraphicsMagick to speed it up. It also adds support for more image formats, like GIF. The downside is that it also requires the GraphicsMagick package to be installed. If it doesn't add too much to the size of the image (at least the box image), I think it is well worth adding.

See https://github.com/asciidoctor/asciidoctor-pdf#supporting-additional-image-file-formats

Created files are from root, with root user and group

If I run the following docker command, all files created are owned by root. Even if executed as user.

docker run --volumes-from taupageapp asciidoctor/docker-asciidoctor asciidoctor --trace -r asciidoctor-diagram -D $WORKSPACE/output $WORKSPACE/docs/index.adoc

If I'm a user e.g. Jenkins, and want to create the documentation, I can run it. The container creates a bunch of files with owner root. After the container terminated, the Jenkins can't delete these files to rerun.

It should be possible to set the user which is used to create the files.

Could not find the 'mermaid' exeutable in PATH

I'm using the latest version of the image and wanted to include a mermaid diagram into my pdf.
If I create a new pdf using this input

[mermaid]
....
sequenceDiagram
    Alice->John: Hello John, how are you?
    loop Reply every minute
        John-->Alice: Great!
    end
....

and this command

asciidoctor-pdf -r asciidoctor-diagram [...]

the error Could not find the 'mermaid' exeutable in PATH will be printed to the final document and no diagram is generated. Instead it's displayed as source code.

Link Asciidoctor Github Organization with DockerHub

Hi @mojavelinux ,

as noticed by @juracy in #114 (comment), the Docker Hub auto builder is building anymore.

After a quick check, it appears that the Docker Hub "asciidoctor" organisation is not linked to the Github organisation asciidoctor (from https://cloud.docker.com/u/asciidoctor/settings/?github-link=1 -> Select "Linked Accounts" on the left menu):

Screenshot 2019-11-02 at 10 16 52

An admin of the Github org. is required so here si the issue for you :)

It looks like that Docker recommends to setup a "service user" for such cases: https://docs.docker.com/docker-hub/builds/#service-users-for-team-autobuilds .

[Test Harness] Improve Graphviz related testing

Following #46 discussion,

it appears that the current test for graphviz is too simple.

As explained by @mojavelinux:

We probably want a slightly more complex example to make sure we put some weight on graphviz to verify it works. Perhaps @pepijnve can advise. @pepijnve do you have a go-to example that you use (perhaps from the test suite) that thoroughly tests the graphviz setup?

This issue is to keep track of this task in the to-do list.

Hello @pepijnve! Could we have your inputs on this domain?

For everyone willing to contribute, do not hesitate to propose here any asciidoctor samples with graphviz that you feel could help.

Docker Image with themes and labs plugin

Hi all,

i created a image with all themes avaliable in asciidoctor-stylesheet-factory repo and plugins asciidoctor-extensions-lab repo. I also merged the three layers in just one, making the image a little bit smaller.

The image source is avaliable at github, and the image at a dockerhub, and off course, the documentation.

The themes are loaded using the environment variable ASCIIDOCTOR_THEME, and the plugins using ASCIIDOCTOR_PLUGIN.

I used the image in other projecs like:

Asciidoctor-revealjs is not working with the last version of the image (05 january 2017)

When calling asciidoctor-revealjs you got this error:

docker run --rm -t --entrypoint asciidoctor-revealjs asciidoctor/docker-asciidoctor --version
/usr/lib/ruby/gems/2.4.0/gems/asciidoctor-revealjs-1.1.0/lib/asciidoctor-revealjs.rb:5:in `require_relative': cannot load such file -- /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-revealjs-1.1.0/lib/asciidoctor-revealjs/converter (LoadError)
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-revealjs-1.1.0/lib/asciidoctor-revealjs.rb:5:in `<top (required)>'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-revealjs-1.1.0/bin/asciidoctor-revealjs:4:in `<top (required)>'
	from /usr/bin/asciidoctor-revealjs:23:in `load'
	from /usr/bin/asciidoctor-revealjs:23:in `<main>'

Repo doesn't have license

This should be a quick one. This repo doesn't have licensee (for the scripts, Dockerfile etc) so please just add one of choice - MIT, Apache 2.0.

asciidoctor-diagram doesn't work on alpine based image

with this sample.adoc file:

= sample

[plantuml,sample-diagram,svg]
----
class Sample {
}
----

I try below, and I've got error

$ docker run -it --rm -v $(pwd)/documents:/documents asciidoctor/docker-asciidoctor
bash-4.3# asciidoctor -r asciidoctor-diagram sample.adoc

asciidoctor-diagram: ERROR: Failed to generate image: Could not find Java executable

Docker build fails

Found that fopub is failing during build when testing pull request.

[root@a0062e11f980 /]# fopub empty.xml
Initializing application...
Downloading http://services.gradle.org/distributions/gradle-2.8-bin.zip
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /root/.gradle/wrapper/dists/gradle-2.8-bin/6b804shgjemjgh821qgf318li1/gradle-2.8-bin.zip to /root/.gradle/wrapper/dists/gradle-2.8-bin/6b804shgjemjgh821qgf318li1
Set executable permissions for: /root/.gradle/wrapper/dists/gradle-2.8-bin/6b804shgjemjgh821qgf318li1/gradle-2.8/bin/gradle
POM relocation to an other version number is not fully supported in Gradle : xml-apis#xml-apis;2.0.2 relocated to xml-apis#xml-apis;1.0.b2.

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':runtime'.
> Could not download jeuclid-core.jar (net.sourceforge.jeuclid:jeuclid-core:3.1.9)
   > Could not get resource 'https://repo1.maven.org/maven2/net/sourceforge/jeuclid/jeuclid-core/3.1.9/jeuclid-core-3.1.9.jar'.
      > Tag mismatch!

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Failed to initialize application

asciidoctor: WARNING: conversion missing in backend pdf for stem

Get this error when using 0.3.1 of asciidoctor-mathematical and running asciidoc from docker image (https://github.com/asciidoctor/docker-asciidoctor/blob/master/Dockerfile):

bash-5.0# asciidoctor-pdf --trace -d book -r asciidoctor-diagram -r asciidoctor-mathematical chap02.adoc
asciidoctor: WARNING: conversion missing in backend pdf for stem
asciidoctor: WARNING: conversion missing in backend pdf for stem
asciidoctor: WARNING: conversion missing in backend pdf for stem

The math content does not render in the pdf. Here is example math content:

[stem]
++++
sig = enc(H(D), s)
++++

I am not sure if the problem is with asciidoctor-mathematical or with docker-asciidoctor

[Proposal] Continuous Deployment process of the image with Travis

Hello, @mojavelinux @gscheibel @jirutka and all the contributors!

I am opening this issue to discuss (before jumping in any implementation) about the CD process for this image.

Challenge Statement

My goal is to propose an implementation with TravisCI, that will take care of the building, testing and deploying the image in the most automated way possible.

Current Status

My proposal is focused on the "Automated Builds" of the DockerHub: https://docs.docker.com/docker-hub/github/.

Currently, we use this for this repository: DockerHub is watching for any change on the repository and will build itself the image (and deploy it in the registry).
=> The main issue is that the test harness is not run by the DockerHub.

Proposals for Solving Challenge

  • If we move the build on TravisCI (watching events on the repository), we could gain the value of running the test harness on each commit/Pull Request, with direct Feedback to GitHub.

  • The Docker Image delivery need to be discussed. Once the repository has been built and tested successfully in Travis, should we:

    • Use docker push to deliver it to the DockerHub
      • Pro: The image on the DockerHub is exactly the same (binary speaking) as the one tested
      • Con: The "trust" with the Docker platform is broken since they cannot be sure "where" the binary come from.
    • Or send a webhook to the DockerHub to kick an "Automated Build"
      • Pro: We have a chance that the tested image differs from the one built by the DockerHub
      • Con: DockerHub users can go back on which Dockerfile / git commit has been used for each tag

=> I propose the webhook solution (where we disable the DockerHub watching). Even if we have a risk to differs, the fact we are using tagged version for a lot of the components + using Alpine Linux make it "leaner".
Since I already did it for other personal projects, I can apply this on my fork and let you check this, before applying it to this repository.

What are your advises on this?

Support for generating (all) diagram types Asciidoctor Diagram supports

What diagram types are supported bij the asciidoctor docker image 'out of the box'?

Until last release (did not test the januari release yet) these were supported:

  • ditaa
  • graphviz
  • plantuml

Best situation would be that all of the formats mentioned at:
http://asciidoctor.org/docs/asciidoctor-diagram/
are supported. Personally i miss blockdiag and mermaid most.

To test support I made the .adoc attached. I hope it can be of use. I can update it to include all of the diagrams mentioned at this moment in all formats (see link above): just let me know.
adoc-diagram-testdoc.adoc.zip

Keep up the good work :-)!

Maarten

Mathematical extensions are not working and test suite does not detect it

Hi,

I ran the test suite and all 24 test were reported as *passed

$ make test
bats /Users/jradek/tmp/playground/docker-asciidoctor/tests/*.bats
...
✓ We can generate an HTML document with asciidoctor-mathematical as backend
...
✓ We can generate a PDF document with asciidoctor-mathematical as backend
...

24 tests, 0 failures

However, when a start a container and manually run the tested commands, especially the ones including the mathematical backend, none of them is working and no output is produced.

E.g. the test for HTML:

bash-4.4# asciidoctor -D tests/tmp -r asciidoctor-mathematical tests/fixtures/sample-with-latex-math.adoc
asciidoctor: FAILED: /documents/tests/fixtures/sample-with-latex-math.adoc: Failed to load AsciiDoc document - can't modify frozen String (FrozenError)
  Use --trace for backtrace

Running with --trace yields:

bash-4.4# asciidoctor --trace -D tests/tmp -r asciidoctor-mathematical tests/fixtures/sample-with-latex-math.adoc
Traceback (most recent call last):
        20: from /usr/bin/asciidoctor:23:in `<main>'
        19: from /usr/bin/asciidoctor:23:in `load'
        18: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/bin/asciidoctor:15:in `<top (required)>'
        17: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/invoker.rb:111:in `invoke!'
        16: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/invoker.rb:111:in `each'
        15: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/invoker.rb:128:in `block in invoke!'
        14: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:183:in `convert_file'
        13: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:183:in `open'
        12: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:183:in `block in convert_file'
        11: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:78:in `convert'
        10: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/load.rb:83:in `load'
         9: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/document.rb:555:in `parse'
         8: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/document.rb:555:in `each'
         7: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/document.rb:556:in `block in parse'
         6: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/document.rb:556:in `[]'
         5: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-mathematical-0.3.0/lib/asciidoctor-mathematical/extension.rb:40:in `process'
         4: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-mathematical-0.3.0/lib/asciidoctor-mathematical/extension.rb:40:in `each'
         3: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-mathematical-0.3.0/lib/asciidoctor-mathematical/extension.rb:41:in `block in process'
         2: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-mathematical-0.3.0/lib/asciidoctor-mathematical/extension.rb:100:in `handle_prose_block'
         1: from /usr/lib/ruby/gems/2.5.0/gems/asciidoctor-mathematical-0.3.0/lib/asciidoctor-mathematical/extension.rb:135:in `handle_inline_stem'
/usr/lib/ruby/gems/2.5.0/gems/asciidoctor-mathematical-0.3.0/lib/asciidoctor-mathematical/extension.rb:135:in `gsub!': asciidoctor: FAILED: /documents/tests/fixtures/sample-with-latex-math.adoc: Failed to load AsciiDoc document - can't modify frozen String (FrozenError)

Similarly for PDF:

bash-4.4# asciidoctor-pdf -D tests/tmp -r asciidoctor-mathematical tests/fixtures/sample-with-latex-math.adoc
asciidoctor: FAILED: /documents/tests/fixtures/sample-with-latex-math.adoc: Failed to load AsciiDoc document - can't modify frozen String (FrozenError)
  Use --trace for backtrace

The trace is the same as for HTML.

Thx, JR

Update to alpine:3.7

Also font-bakoma-ttf is in v3.7, so it’s not needed to install it from edge anymore:

-   && apk add --no-cache \
-     --repository https://nl.alpinelinux.org/alpine/edge/community \
- font-bakoma-ttf \
+ font-bakoma-ttf

Study & Improve Image Size

After #39, #46 and #47 have increased the size of the image (protip: I might be the person responsible on this by missing knowledge on Ruby Gems / Native Alpine Package).

Helped has been asked in #47 on this, and we might be able to improve this in the future.

I propose that we first implement a CD process where logs are available with testing harness (cf proposal in #49 ) before jumping on this topic.

What would be your thoughts @mojavelinux @jirutka and the community?

[EDIT] The size increased was caused by the "return" of the JRE OpenJDK 8 installation in #46

ditaa diagrams in PDF

I have seen that my ditaa diagrams seem to be like 50% of the page in my PDF, is that a default value somewhere? The code I use is something like:

.ACME Corp Org Chart
[ditaa]
----
                                                     +----------------+
                                                     |                |
                                                     |  CEO Office    |
                                                     |                |
                                                     +-------+--------+
----

Code highlighting not working in html

I can't seem to get code highlighting working in html using this.

coderay is installed, but pygmentize on the command line does not work.

Have you tested this? Or could it be an error at my end? Highlighting in PDF does work.

Thanks!

add timezone setting

Timezone is UTC in the container now, because no timezone setting presents now.

like this:

apk --update add tzdata
export TZ=Asia/Tokyo   # other way needed for convenience.

Create releases/tags for Docker Images

As explained in the Docker development best practices documentation:

Do not rely on the automatically-created latest tag.

We need to create git tags and docker tags for each new version (as we do for others projects):

  • the master branch will always be built as latest tag
  • each time we create a release (tag on GitHub), then we need to create a tag on the DockerHub admin UI manually.

Tag/version

We need to decide how to tag this project.
IMO the most important thing is to be able to quickly know the asciidoctor versions included in the docker image.
We can either:

  1. based the tag/version on the asciidoctor version (examples: 1.5.6.1-1.0.0 or 1.0.0-1.5.6.1)
  2. manage only the docker-asciidoctor version in the tag (example:1.0.0) AND add LABEL in the Dockerfile to add metatada about the asciidoctor projects versions:
     LABEL org.asciidoctor.version="1.5.6.1" \
      org.asciidoctor-pdf.version="1.5.0.alpha.16" \
      org.asciidoctor-epub3.version="1.5.0.alpha.7"...
    
  • then those information will be available via the docker inspect command

I vote for the solution 2) because it will be easy for the users to pull the right Docker Image version (docker pull asciidoctor/docker-asciidoctor:1.0.0) and to know the exact asciidoctor versions included.

Note: I'm ok to do the manual steps when we need to perform a release (we can think about automating it later)

Unable to generate PDF if pygments is chosen as the source highlighter.

Hello,

I am unable to generate a PDF with the following content:

= Test
:source-highlighter: pygments

[source,java]
----
public static void main(String [] args){

}
----

[source,sh]
----
$ du -sh
----

The error message that I am getting:

bash-4.3# asciidoctor-pdf --trace index.adoc
/usr/lib/ruby/gems/2.4.0/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/formatted_text/formatter.rb:16:in `format': undefined method `match' for nil:NilClass (NoMethodError)
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:1324:in `convert_listing_or_literal'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:118:in `convert'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:70:in `convert'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `block in content'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `map'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `content'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1120:in `content'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:134:in `convert_content_for_block'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:207:in `convert_document'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:118:in `convert'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1060:in `convert'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1502:in `convert'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575:in `block in convert_file'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575:in `open'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575:in `convert_file'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/cli/invoker.rb:108:in `block in invoke!'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/cli/invoker.rb:102:in `each'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/cli/invoker.rb:102:in `invoke!'
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-pdf-1.5.0.alpha.16/bin/asciidoctor-pdf:31:in `<top (required)>'
	from /usr/bin/asciidoctor-pdf:23:in `load'
	from /usr/bin/asciidoctor-pdf:23:in `<main>'

But if I were to change the highlighter to :source-highlighter: coderay, the PDF would be generated just fine.

To start the container, I'm using a script:

#!/usr/bin/env bash

docker \
    run \
    -it \
    --rm \
    -v $(pwd)/documents:/documents/ \
    asciidoctor/docker-asciidoctor:latest

My working directory:

error-report/
├── documents
│   └── index.adoc
└── start-container.sh

1 directory, 2 files

Docker image being used:

$ docker images
REPOSITORY                       TAG                 IMAGE ID            CREATED             SIZE
asciidoctor/docker-asciidoctor   latest              8281da120098        4 weeks ago         449MB

Local Gems:

bash-4.3# gem list

*** LOCAL GEMS ***

addressable (2.5.2)
afm (0.2.2)
Ascii85 (1.0.2)
asciidoctor (1.5.6.1)
asciidoctor-confluence (0.0.2)
asciidoctor-diagram (1.5.7)
asciidoctor-epub3 (1.5.0.alpha.7)
asciidoctor-mathematical (0.2.2)
asciidoctor-pdf (1.5.0.alpha.16)
asciidoctor-revealjs (1.1.1)
coderay (1.1.2)
concurrent-ruby (1.0.5)
css_parser (1.6.0)
epubcheck (3.0.1)
faraday (0.9.2)
gepub (0.6.9.2)
haml (5.0.4)
hashery (2.1.2)
i18n (0.9.1)
json (default: 2.0.4, 1.8.6)
kindlegen (3.0.3)
mathematical (1.6.8)
mini_portile2 (2.1.0)
multi_json (1.12.1)
multipart-post (2.0.0)
nokogiri (1.6.8.1)
openssl (default: 2.0.5)
pdf-core (0.7.0)
pdf-reader (2.0.0)
polyglot (0.3.5)
prawn (2.2.2)
prawn-icon (1.3.0)
prawn-svg (0.27.1)
prawn-table (0.2.2)
prawn-templates (0.1.1)
psych (default: 2.2.2)
public_suffix (3.0.1)
pygments.rb (1.1.2)
rake (12.3.0)
rouge (3.1.0)
ruby-enum (0.7.2)
ruby-rc4 (0.1.5)
rubyzip (1.2.1)
safe_yaml (1.0.4)
slim (3.0.9)
temple (0.8.0)
thread_safe (0.3.6)
tilt (2.0.8)
treetop (1.5.3)
ttfunk (1.5.1)

PS: I was actually using the previous :latest version of this docker image and it was working fine (with pygments) till today -- I don't know when it / what happened that caused it to suddenly stopped working. Upgrading to the current :latest version didn't help.

Previous Image ID (afaict):

REPOSITORY                       TAG                 IMAGE ID            CREATED              SIZE
asciidoctor/docker-asciidoctor   <none>              212019b2d6ef        2 months ago         441MB

Thank you.

Switch to Asciidoctor RPM

I think we should switch to using RPMs if available. We have an RPM for Asciidoctor, so I think we can use it. Doing so serves two purposes:

  1. It will install faster when building (since we don't have to wait for rubygems.org)
  2. We make sure to test the RPM implicitly

We're blocked at the moment waiting on the Asciidoctor 1.5.0 RPM for Fedora 20. When it is, then we could switch to it using:

$ yum install asciidoctor

Use Alpine Docker image

I have seen that currently you are using fedora docker image. This is a huge image which maybe the 90% of the size is of unused things. I recommend use Alpine image http://gliderlabs.viewdocs.io/docker-alpine In terms of Dockerfile it requires more instructions, but the image only uses 5Mb, which I think that for an Asciidoctor image (which you want it to render documents), it is the perfect one.

Provide a multi-arch Docker Image

This image is currently targeted on a Linux container with x86_64 CPU architecture.

Docker galaxy recently saw the "manifest 2.2" landing, enabling multi-arch support on a single image name.

In our case, it means that the command docker pull asciidoctor/docker-asciidoctor would have the same outcomes on any supported platform.

The CPU architectures armv6 and armv7 would be easy to start with (using quemu it will be very easy to build and test within TravisCI).

x86 (32 bits) might work.

The Windows container version could be also easy to build, I am less sure on the test harness (we would need a Window server for this).

zOS: I don't know :)

Here is a list of useful links about this capability, to help to start with:

Ghostscript is missing

If the container included Ghostscript, it'd allow the built-in optimisation of asciidoctor-pdf to be used - see #111

Allow hexapdf to be installed

Would it be possible to add hexapdf to this Docker image please? Or would licensing conflicts prevent that?
EDIT: Would it be possible to allow users (at their own risk) to install hexapdf inside the Docker container please?

I tried gem install hexapdf inside the container, and got:

Fetching: cmdparse-3.0.4.gem (100%)
Successfully installed cmdparse-3.0.4
Fetching: geom2d-0.2.0.gem (100%)
Successfully installed geom2d-0.2.0
Fetching: hexapdf-0.10.0.gem (100%)
Successfully installed hexapdf-0.10.0
ERROR:  While executing gem ... (Gem::DocumentError)
    RDoc is not installed: cannot load such file -- rdoc/rdoc

I know nothing about Ruby, so I (naively) tried running gem install rdoc and that gives an error too:

Fetching: rdoc-6.2.0.gem (100%)
Successfully installed rdoc-6.2.0
ERROR:  While executing gem ... (NoMethodError)
    undefined method `reset' for RDoc::TopLevel:Class

😢

Improve Asciidoctor version number management

So the Asciidoctor's version is currently written in 3 locations into the repository:

  • Into the Makefile as a an expected single entrypoint (it is propagated to the docker build command as build argument + it is passed as environment variable to the test suite).
  • Into the Dockerfile as default value for the ARG ASCIIDOCTOR_VERSION directive:
    • This is overwritten during the Travis Build
    • But the DockerHub was not providing parameterized build capability when the new build process was done.
  • Into the README.adoc as sharply caught by @mojavelinux in #71

The goal of this issue is to track the work related to having a single location.

PS: Might be linked with #54

Isn't this image missing 'gem install haml tilt'?

Hi,

Just tried to use that image to transform a .adoc to a deck.js presentation, and it didn't work at first shot.

After running:
$ gem install haml tilt

And then, the transform runs fine.

Maybe I'm missing something else, 'cause I'm not at all Ruby/Gem savvy, but at least I hope this issue will help. That's also why I'm not (yet) filing a PR.

Once confirmed, I can sure do it.

Cheers!

fopub not present

I installed using:

docker run -it -v <your directory>:/documents/ asciidoctor/docker-asciidoctor

Asciidoctor is there, but fopub not:

bash-4.4# asciidoctor -v
Asciidoctor 1.5.8 [https://asciidoctor.org]
Runtime Environment (ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-linux-musl]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
bash-4.4# fopub
bash: fopub: command not found

Is it not included or am I missing something? Thank you!

Makefile questions

  1. Why is README.md listed as a .PHONY dependency?

  2. Would it make sense to have separate rules for updating README.md (I guess it could then be non-phony) and for pushing any README.md changes back into github (instead of having them combined into a single rule as they are now)

  3. As cache is a directory, I think it should be listed as an order-only dependency? i.e. change

cache/pandoc-2.2-linux.tar.gz: cache

to

cache/pandoc-2.2-linux.tar.gz: | cache
  1. Should the version of pandoc (currently 2.2) also be made into a Makefile variable, to make it easier to update? I'd be happy to put together a PR for this if you think it'd be useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.