CLI Reference

Complete reference for all Swiftdock command-line interface commands.

swiftdock pull

Pull an OCI/Docker image from a registry.

Usage

swift run swiftdock pull <IMAGE>

Arguments

Examples

# Pull Alpine Linux
swift run swiftdock pull alpine:latest

# Pull specific version
swift run swiftdock pull ubuntu:22.04

# Pull from Docker Hub (default)
swift run swiftdock pull nginx:latest

swiftdock run

Create and start a container from an image.

Usage

swift run swiftdock run <IMAGE> -- <COMMAND> [ARGS...]

Arguments

Examples

# Run echo command
swift run swiftdock run alpine:latest -- echo "Hello World"

# Run shell command with arguments
swift run swiftdock run alpine:latest -- sh -c "echo 'Multiple commands'"

# Run a simple command
swift run swiftdock run ubuntu:latest -- whoami

Output

Creating container for alpine:latest...
Created 6B53E52E-B2EC-435D-B957-B5202C1E5677
Starting...
Started with PID 85965
(Polling for exit...)
Container exited.
Hello World

swiftdock ps

List all containers (running and exited).

Usage

swift run swiftdock ps

Output Format

Displays containers in a table format:

CONTAINER ID    IMAGE           STATUS  PID
6B53E52E-B2E    alpine:latest   exited  85965
2DF48833-0B9    alpine:latest   created 0

Status Values

swiftdock logs

Fetch stdout/stderr logs from a container.

Usage

swift run swiftdock logs <CONTAINER_ID>

Arguments

Examples

# Get logs from a container
swift run swiftdock logs 6B53E52E-B2EC-435D-B957-B5202C1E5677

Note

You must use the full container ID, not the truncated version shown in ps. Get the full ID from the run command output.

Global Behavior