Enabling WinRM Support for RunDeck (Docker)

Enabling WinRM Support for RunDeck (Docker)

June 19, 2025·Tyler Rasmussen
Tyler Rasmussen

By default, the RunDeck (OSS version) Docker image does not support WinRM for Windows deployments as it lacks the PyWinRM plugin. To work around this limitation, you can create a custom image; based off the official image, with the PyWinRM plugin installed.

Create a file called dockerfile, with the following contents. Update the RunDeck image and PyWinRM links with their latest version counterparts.

# Use the official open-source Rundeck image as base.
FROM rundeck/rundeck:5.12.0

# Install Python 3 and pip3.
USER root
RUN apt-get update && \
    apt-get install -y python3 python3-pip && \
    pip3 install --no-cache-dir pywinrm && \
    apt-get clean

# Create plugin directory if it doesn't exist.
RUN mkdir -p /home/rundeck/libext

# Download and install the py-winrm-plugin.
ADD https://github.com/rundeck-plugins/py-winrm-plugin/releases/download/2.1.3/py-winrm-plugin-2.1.3.zip /home/rundeck/libext/

# Extract and install plugin.
RUN unzip /home/rundeck/libext/py-winrm-plugin-2.1.3.zip -d /home/rundeck/libext/
RUN rm /home/rundeck/libext/py-winrm-plugin-2.1.3.zip 

Build a custom docker image using the above dockerfile. Replace twobyte/rundeck with your preferred name for the container. The tag: 5.12.0 is arbitary, replace it whatever convention your organization uses. A version number is most common.

sudo docker build -t twobyte/rundeck:5.12.0 .

Update your existing docker-compose.yml file to use the new image.

services:
  rundeck:
    image: twobyte/rundeck:5.12.0
...

Apply your changes to the swarm.

sudo docker stack deploy -c docker-compose.yml stack_name

Or for non-swarm environments (assuming Docker Compose):

docker-compose up -d