This document describes how to use sc-docker with Podman as a Docker alternative.
Podman is a daemonless container runtime that provides a Docker-compatible command-line interface. While sc-docker is primarily designed for Docker, it can work with Podman with some considerations.
- Install Podman:
# Ubuntu/Debian
sudo apt-get update && sudo apt-get install -y podman
# Fedora/RHEL/CentOS
sudo dnf install -y podman
# Arch Linux
sudo pacman -S podman- Enable Docker compatibility:
# Create docker command alias
sudo ln -s /usr/bin/podman /usr/bin/docker
# OR use podman-docker package (if available)
sudo apt-get install podman-docker # Ubuntu/Debian
sudo dnf install podman-docker # Fedora- Enable Podman socket for Docker API compatibility:
systemctl --user enable --now podman.socket
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock- Build sc-docker images:
cd docker
./build_images.shRootless Podman uses different network backends that have limitations for LAN game discovery:
- pasta (default): NAT without L2 broadcast support
- slirp4netns: Similar NAT limitations
- host: Full network access but shares host network namespace
Since rootless networking doesn't support UDP broadcast for game discovery, use these alternatives:
Use bwheadless's --lan-sendto flag to directly connect to a specific IP:
# Host a game on your machine
scbw.play --bots "HostBot" --headless
# Join from container (replace IP with your host IP)
podman run -d --name sc-joiner \
--network pasta \
--cap-add NET_RAW --cap-add NET_ADMIN --cap-add NET_BIND_SERVICE \
-v "$HOME/.scbw/maps:/app/sc/maps:ro" \
starcraft:game \
/app/play_human.sh \
--name JoinBot --race T \
--lan --join --lan-sendto 192.168.1.100:6112If you need full LAN discovery, use rootful Podman:
sudo podman network create sc_net --driver bridge
sudo scbw.play --bots "Bot1" "Bot2"For testing, you can use host networking:
podman run --network host ...If you encounter permission errors with volume mounts:
# Fix ownership of .scbw directory
podman unshare chown -R $(id -u):$(id -g) ~/.scbw
# Or use :z flag for SELinux systems
-v "$HOME/.scbw/maps:/app/sc/maps:ro,z"If scbw.play can't find Docker:
# Start podman socket
systemctl --user start podman.socket
# Set environment variable
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
# Install podman-docker compatibility package
sudo apt-get install podman-dockerIf network creation fails in rootless mode:
# Use podman directly to create network
podman network create sc_net
# Or switch to rootful
sudo podman network create sc_netscbw.play --bots "Bot1" "Bot2" --debugpodman logs <container-name>
podman exec <container-name> cat /app/logs/game.log# Check network configuration
podman network inspect sc_net
# Test connectivity between containers
podman exec -it container1 ping container2
# Capture network traffic
podman exec container tcpdump -i any -w /tmp/capture.pcapscbw.play --bots "Bot1" "Bot2" \
--mem_limit "512m" \
--nano_cpus 1000000000 # 1 CPUFor better performance, use overlay storage driver:
# Check current driver
podman info | grep -i storage
# Configure overlay (in ~/.config/containers/storage.conf)
[storage]
driver = "overlay"- ✅ Arch Linux with Podman 4.x
- ✅ Ubuntu 22.04 with Podman 3.4+
- ✅ Fedora 38+ with Podman 4.x
| Feature | Docker | Rootless Podman | Rootful Podman |
|---|---|---|---|
| Bot vs Bot | ✅ | ✅ | ✅ |
| Human vs Bot | ✅ | ✅ | |
| LAN Discovery | ✅ | ❌ | ✅ |
| VNC Access | ✅ | ✅ | ✅ |
| Debug Mode | ✅ | ✅ | ✅ |
- ✓ Podman installed and running
- ✓ Docker compatibility enabled (
podman-dockerpackage or alias) - ✓ Podman socket running (
systemctl --user status podman.socket) - ✓ DOCKER_HOST environment variable set
- ✓ Images built successfully (
podman images | grep starcraft) - ✓ Network created (
podman network ls | grep sc_net) - ✓ Permissions correct on ~/.scbw directory
- ✓ For LAN games: using --lan-sendto or rootful mode