Run MkDocs - Read the Docs Alternative - in Docker @i12bretro
Run MkDocs - Read the Docs Alternative - in Docker  @i12bretro
Uploaded February 2025 | Updated November 2026, 1 day ago
#MkDocs #Containers #Docker

Full steps can be found at i12bretro.github.io/tutorials/0986.html

--------------------------------------------------------------------
What is MkDocs?
--------------------------------------------------------------------
MkDocs is a fast, simple and downright gorgeous static site generator that's geared towards building project documentation. Documentation source files are written in Markdown, and configured with a single YAML configuration file. It is designed to be easy to use and can be extended with third-party themes, plugins, and Markdown extensions. -  github.com/mkdocs/mkdocs
 
--------------------------------------------------------------------
Installing Docker
--------------------------------------------------------------------
   01. Log into the Linux based device
   02. Run the following commands in the terminal
         # install prerequisites
         sudo apt install apt-transport-https ca-certificates git curl software-properties-common gnupg-agent -y
         # add docker gpg key
         curl -fsSL download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
         # add docker software repository
         sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
         # install docker
         sudo apt install docker-ce docker-compose containerd.io -y
         # enable and start docker service
         sudo systemctl enable docker && sudo systemctl start docker
         # add the current user to the docker group
         sudo usermod -aG docker $USER
         # reauthenticate for the new group membership to take effect
         su - $USER
 
--------------------------------------------------------------------
Running MkDocs
--------------------------------------------------------------------
   01. Now that Docker is installed, run the following commands to setup the MkDocs Docker container and run it
         # create working directory
         mkdir ~/docker/mkdocs
         # set owner of working directories
         sudo chown "$USER":"$USER" ~/docker -R
         # allow the container to write to working directories
         sudo chmod a+rwx -R ~/docker/mkdocs
         # run mkdocs container
         docker run -d --name=mkdocs -p 8000:8000 -v ~/docker/mkdocs/:/mkdocs --restart=unless-stopped polinux/mkdocs
   02. Open a web browser and navigate to http://DNSorIP:8000
   03. Welcome to MkDocs running in Docker
 
--------------------------------------------------------------------
Read the Docs Theme
--------------------------------------------------------------------
   01. Back in the terminal, continue with the following commands
         # stop the container
         docker stop mkdocs
         # edit the mkdocs configuration file
         sudo nano ~/docker/mkdocs/mkdocs.yml
   02. Add the following line to mkdocs.yml
         theme: readthedocs
   03. Press CTRL+O, Enter, CTRL+X to write the changes
   04. Run the following command to see the change
         # restart the container
         docker start mkdocs
   05. Back in the web browser, refresh the mkdocs page
 
Source:  mkdocs.org/getting-started
Documentation:  hub.docker.com/r/polinux/mkdocs
 


### Connect with me and others ###
★ Discord: discord.com/invite/EzenvmSHW8
★ Reddit: reddit.com/r/i12bretro
★ Twitter: twitter.com/i12bretro
Run MkDocs - Read the Docs Alternative - in DockerRun Matomo - Google Analytics Alternative - in DockerRunning PHP Server Monitor in DockerConfigure SSH Key-Based Authentication on LinuxRun Dashy Application Dashboard in DockerContainerized Self-Hosted ACME Server with Step-CA in DockerSony PlayStation 4 Boot Animationi12bretro Plays the [Hated?] Video Background MusicRunning phpBB Bulletin Board/Forum in Docker on Ubuntu ServerQuickly Deploy an Apache/PHP/MySQL Development Environment in DockerInstall Invoice Plane - Invoice and Payment Manager - On LinuxRunning a MacOS 15 Sequoia VM in VMware
i12bretro |

Run MkDocs - Read the Docs Alternative - in Docker

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER