pandoc / dockerfiles

Dockerfiles for various pandoc images
GNU General Public License v2.0
364 stars 98 forks source link

Workflow for creating modified images i.e. different filters #241

Closed candronikos closed 2 months ago

candronikos commented 2 months ago

Hi All,

I'm new to pandoc and newer to Haskell.

What would be the idiomatic way of creating a custom image with extra filters, i.e. pandoc-plot?

I envision a DOCKERFILE as follows but I haven't had much luck so far.

FROM pandoc/extra:latest-ubuntu

RUN apt-get update
RUN apt-get install -y python3 python3-plotly python3-matplotlib
RUN apt-get install -y cabal-install
RUN cabal update
RUN cabal install pandoc-plot

Then I want to run the image including the filters in the workflow.

Any help would be appreciated.

tarleb commented 2 months ago

The above fails because cabal isn't installed in the container; we use cabal to build the binaries, but don't ship it in the final image.

I would probably use conda or a similar install method for pandoc-plot, or, if possible, use a Lua filter like diagram. The Lua filter is just a single script file and therefore easy to install, but the list of supported graphing engines is different.

candronikos commented 2 months ago

FYI, I downloaded the executable directly off github as suggested by @LaurentRDC and it worked.

Thank you.