Convert Docker files to Podman-compatible formats automatically across your entire project.
By default, converts everything:
- Renames
Dockerfile→Containerfile - Renames
docker-compose.yml→compose.yml - Updates Kubernetes/OpenShift YAML manifests
- Updates CI/CD pipeline files (GitHub Actions, GitLab CI, etc.)
- Updates shell scripts with Docker commands
- Updates other YAML files with Docker references
- Recursively processes entire directory trees
- Replaces Docker commands with Podman equivalents throughout
- Skips hidden directories and common ignore patterns (
.git,node_modules,venv, etc.)
git clone https://github.com/soyr-redhat/dcomp.git
cd d-compose
chmod +x dcompThen add to PATH using one of the methods below for your OS.
curl -O https://raw.githubusercontent.com/soyr-redhat/dcomp/main/dcomp
chmod +x dcomp- Move the script to a location of your choice (or use the cloned directory):
# Example: move to ~/bin
mkdir -p ~/bin
mv dcomp ~/bin/- Add to your PATH by editing
~/.bashrc(or~/.bash_profileon older macOS):
echo 'export PATH="$PATH:$HOME/bin"' >> ~/.bashrc
source ~/.bashrc- Move the script to a location of your choice:
# Example: move to ~/bin
mkdir -p ~/bin
mv dcomp ~/bin/- Add to your PATH by editing
~/.zshrc:
echo 'export PATH="$PATH:$HOME/bin"' >> ~/.zshrc
source ~/.zshrc# Install for all users (requires sudo)
sudo mv dcomp /usr/local/bin/
sudo chmod +x /usr/local/bin/dcomp- Create a directory for your scripts (if it doesn't exist):
New-Item -Path "$env:USERPROFILE\bin" -ItemType Directory -Force- Move the script there:
Move-Item dcomp "$env:USERPROFILE\bin\dcomp"- Add to your PATH (run PowerShell as Administrator):
# Get current PATH
$currentPath = [Environment]::GetEnvironmentVariable("Path", "User")
# Add new directory to PATH
[Environment]::SetEnvironmentVariable(
"Path",
"$currentPath;$env:USERPROFILE\bin",
"User"
)- Restart your terminal and verify:
dcomp --helpFollow the Linux instructions above within your WSL environment.
After adding to PATH, verify it works:
dcomp --help# Convert all Docker files to Podman (recommended - does everything)
dcomp .
# Convert files in specific directory
dcomp /path/to/project
# Preview changes without applying (dry run)
dcomp . --dry-run
# Skip specific file types
dcomp . --skip-k8s # Skip Kubernetes/OpenShift YAML
dcomp . --skip-ci # Skip CI/CD pipelines
dcomp . --skip-scripts # Skip shell scripts
dcomp . --skip-yaml # Skip other YAML files
# Only rename Dockerfiles, don't update content
dcomp . --no-content
# Verbose output
dcomp . -v
# Combine options
dcomp ../my-project --dry-run -v
dcomp . --skip-k8s --skip-ci --dry-run# Preview all changes in current directory (recommended first step)
dcomp --dry-run .
# Convert everything in a project (Dockerfiles, K8s, CI/CD, scripts, YAML)
dcomp ~/projects/my-app
# Convert only Dockerfiles and compose files, skip everything else
dcomp . --skip-k8s --skip-ci --skip-scripts --skip-yaml
# Convert a monorepo with verbose output to see all changes
dcomp -v /path/to/monorepo
# Preview K8s manifest changes without touching CI/CD
dcomp --dry-run --skip-ci /path/to/k8s-projectDockerfile→ContainerfileDockerfile.dev→Containerfile.devDockerfile.*→Containerfile.*docker-compose.yml→compose.ymldocker-compose.yaml→compose.yaml
Docker commands (safe, functional replacements):
docker build→podman builddocker run→podman rundocker push→podman pushdocker pull→podman pulldocker tag→podman tagdocker login→podman logindocker logout→podman logoutdocker images→podman imagesdocker ps→podman psdocker exec→podman execdocker logs→podman logsdocker stop/start/rm/rmi→podman stop/start/rm/rmidocker-compose→podman-compose
Socket paths (required for Podman):
/var/run/docker.sock→/run/podman/podman.sockvar/run/docker.sock→run/podman/podman.sock
What we DON'T change:
- Registry prefixes (
docker.io/) are kept as-is for safety - Image names and tags remain unchanged
- Only commands are converted, not image references
Always processed:
- Dockerfiles (any name matching
DockerfileorDockerfile.*) - docker-compose files (
docker-compose.yml,docker-compose.yaml)
Processed by default (use --skip flags to exclude):
- Kubernetes/OpenShift: Deployments, Services, Pods, ConfigMaps, Routes, BuildConfigs, etc.
- CI/CD pipelines:
.github/workflows/*.yml,.gitlab-ci.yml, Jenkins files, CircleCI configs - Shell scripts: Any
.shfiles - Other YAML: Any
.ymlor.yamlfiles with Docker references
- Skips files if target already exists (won't overwrite
Containerfileif it exists) - Use
--dry-runto preview changes first - Only processes files in the specified directory tree
- Automatically skips hidden directories and common patterns
- Python 3.6+
- No external dependencies