How to install plugins in mkdocs-material docker image

Viewed 1782

Hello Stackoverflow community,

I use mkdocs with continous integration (drone-ci) to build and deploy documentation.

I use the docker image mkdocs-material from squidfunk, but I need some plugins on top of it.

I tried to build my custom image with this maybe naive Dockerfile:

FROM squidfunk/mkdocs-material

RUN pip install --no-cache-dir \
  mkdocs-awesome-pages-plugin \
  mkdocs-minify-plugin \
  mkdocs-git-revision-date-localized-plugin \
  mkdocs-bibtex \
  mkdocs-img2fig-plugin \
  mkdocs-mermaid2-plugin

ENTRYPOINT ["mkdocs"]

However during the build process in continous integration I get the error:

ERROR   -  Config value: 'plugins'. Error: The "bibtex" plugin is not installed 

Aborted with 1 Configuration Errors!

which seems to indicate mkdocs in docker cannot find the mkdocs-bibtex package.

Does anyone know how to properly install additional mkdocs plugins on top of squidfunk's docker image?

PS: I get no error when I build mkdocs doc manually outside docker.

1 Answers

My dockerfile is correct. The problem was due to the fact I was pulling a wrong docker image in my continous integration pipeline...

Bye.

Related