MKDocs Documentation Site - activoricordi/notebooks GitHub Wiki
MKDocs Documentation Sites
Project contains a separated MKDocs docker container. This container has its own Dockerfile. This Dockerfile is similar to the [one] created for Jupyterlab.
Multi-stage Build
Docker allows performing a multi-stage build to minimize the Docker image size.
Docker Base Image
Although Alpine is a great Linux distro for creating a Docker base Image, there are other possible valid options such as debian slim (debian:stable-slim) or debian buster slim (debian:buster-slim). These base images are light and allow using very well known tools such as apt-get.
FROM python:3.8-slim-buster AS compile-image
There are already python base images such as python:3.8-slim-buster. Having Python installed, it makes unnecessary to install Miniconda distribution and it is possible to specifically install a Python Package Manager and a Python Virtual Environment Manager.
Python Package Manager
Similarly to Jupyterlab, this project uses both Conda and Mamba package manager. Conda is a package manager.
environment.yml
- nbconvert 5.4.1
- nbextensions 0.5.1
- Pandoc 1.19.2.1
- MiKTeX 2.9
# Install the package as normal:
COPY environment.yml .
RUN conda env create -f environment.yml
Install Mamba
# Python packages
RUN conda config --add channels conda-forge && \
conda install --yes --quiet \
mamba && conda clean -yt
Working Directory
Add MKDocks Plugins
Add ToC Sidebar Plugin
Add mkdocs toc sidebar plugin mkdocs Table of Contents sidebar plugin
Tasks
- Add mkdocs toc sidebar plugin