Skip to content

Running the website locally for web development | Podman

This document walks through how to recreate and run a local copy of the entire website on your local machine. Running a local copy of the documentation website might be useful in the following scenarios:

  • You are interested in learning about and contributing to the web development aspects of the website
  • You are an author and you'd like to see how your documents will render/look on the docs website before contributing them

Create the content environment

  1. Ensure that the prerequisites are satisfied. If not please skip to the "Setup the prerequisites" section and then return here.

  2. Change the current working directory on your local system to a folder where you intend to do your writing. We will refer to this directory as $ROCKYDOCS in the rest of this guide. For our demo here, $ROCKYDOCS points to $HOME/projects/rockydocs on our demo system.

    Create $ROCKYDOCS if it doesn't already exist and change your working directory to $ROCKYDOCS type:

    mkdir -p $HOME/projects/rockydocs
    export ROCKYDOCS=${HOME}/projects/rockydocs
    cd  $ROCKYDOCS
  3. Ensure you have git installed (dnf -y install git). While in $ROCKYDOCS use git to clone the official Rocky Documentation content repo. Type:

    git clone

    You will now have a $ROCKYDOCS/documentation folder. This folder is a git repository and under git's control.

  4. Also use git to clone the official repo. Type:

    git clone

You will now have a $ROCKYDOCS/ folder. This folder is where you can experiment with your web development contributions.

Create and Start the RockyDocs web development environment

  1. Ensure you have Podman up and running on your local machine (you can check with systemctl). Test by running:

    systemctl  enable --now podman.socket
  2. Create a new docker-compose.yml file with the following contents:

    version: '2'
        privileged: true
        image: rockylinux:9.1
          - 8001:8001
          PIP_NO_CACHE_DIR: "off"
          - type: bind
            source: ./documentation
            target: /app/docs
          - type: bind
            source: ./
            target: /app/
        working_dir: /app
        command: bash -c "dnf install -y python3 pip git && \
          ln -sfn  /app/docs && \
          cd && \
          git config  --global webmaster && \
          git config  --global && \
          curl -SL -o mike-plugin-changes.patch && \
          git apply --reverse --check mike-plugin-changes.patch && \
          /usr/bin/pip3 install --no-cache-dir -r requirements.txt && \
          /usr/local/bin/mike deploy -F mkdocs.yml 9.1 91alias && \
          /usr/local/bin/mike set-default 9.1 && \
          echo  All done && \
          /usr/local/bin/mike serve  -F mkdocs.yml -a"    

    Save the file with the file name docker-compose.yml in your $ROCKYDOCS working directory.

    You can also quickly download a copy of the docker-compose.yml file by running:

    curl -SL -o docker-compose.yml
  3. Finally use docker-compose to bring up the service. Type:

    docker-compose  up

View the local website

If you have a firewall running on your Rocky Linux system, ensure that port 8001 is open. Type:

firewall-cmd  --add-port=8001/tcp  --permanent
firewall-cmd  --reload

With the container up and running, you should now be able to point your web browser to the following URL to view your local copy of the site:




Setup the prerequisites

Install and setup Podman and other tools by running:

sudo dnf -y install podman podman-docker git

sudo systemctl enable --now  podman.socket

Install docker-compose and make it executable. Type:

curl -SL -o /usr/local/bin/docker-compose

chmod 755 /usr/local/bin/docker-compose

Fix permissions on docker socket. Type:

sudo chmod 666 /var/run/docker.sock


  • The instructions in this guide are NOT a prerequisite for Rocky documentation authors or content contributors
  • The entire environment runs in a Podman container and so you will need Podman properly setup on your local machine
  • The container is built on top of the official Rocky Linux 9.1 docker image available here
  • The container keeps the documentation content separate from the web engine (mkdocs)
  • The container starts a local web server listening on port 8001.

Author: Wale Soyinka

Contributors: Ganna Zhyrnova