Skip to main content
MarkItDown provides a Docker image with all dependencies pre-installed, including optional tools like FFmpeg and ExifTool.

Quick Start

Using Pre-built Image

Convert a file using the Docker image:

Building the Image

Build the Docker image from source:

Build Arguments

The Dockerfile supports optional build arguments:

Dockerfile Details

The MarkItDown Dockerfile is based on python:3.13-slim-bullseye and includes:
1

Base Image

Lightweight Python 3.13 on Debian Bullseye
2

System Dependencies

Installs FFmpeg for audio processing and ExifTool for image metadata
3

Python Packages

Installs MarkItDown with all optional dependencies and the sample plugin
4

User Configuration

Runs as non-root user for security

Environment Variables

The following environment variables are set:

Usage Examples

Basic File Conversion

Mount your files directory and convert:

Save Output to File

Or using shell redirection:

Using stdin

Pipe content into the container:

With Plugins

Plugins are already installed in the image:

List Installed Plugins

Batch Conversion

Convert multiple files:

Interactive Shell

Drop into a shell to run multiple commands:
Then inside the container:

Docker Compose

Create a docker-compose.yml for repeated use:
Run with:

Azure Document Intelligence

Pass Azure credentials via environment variables:
Or using Azure Identity (for managed identities):

Volume Mounting

Linux/macOS

Mount current directory:
Mount specific directory:

Windows (PowerShell)

Windows (Command Prompt)

Performance Considerations

Docker adds some overhead compared to native execution. For batch processing of many files, consider:
  • Running the container in interactive mode and processing multiple files
  • Using volume mounts efficiently
  • Building the image locally to avoid download times

Troubleshooting

Permission Issues

If you encounter permission errors with output files:

File Not Found

Ensure the file path is relative to the mounted volume:

Missing Dependencies

The Docker image includes all optional dependencies by default. If you built a custom image without [all]:

Image Size

The image includes:
  • Python 3.13
  • FFmpeg (for audio processing)
  • ExifTool (for image metadata)
  • All MarkItDown optional dependencies
  • Sample plugin
Expect the image size to be approximately 500MB-1GB.

Security

The default container runs as the nobody user for security. Avoid running as root unless necessary.
Best practices:
  • Keep the base image updated
  • Use specific image tags in production
  • Scan images for vulnerabilities
  • Limit volume mounts to necessary directories only