Actions Status MetaCPAN Release

NAME

dozo - Dôzo, Docker with Zero Overhead

SYNOPSIS

dozo -I IMAGE [ options ] [ command ... ]

-h, --help         show help
    --version      show version
-d, --debug        debug mode (show full command)
-x, --trace        trace mode (set -x)
-q, --quiet        quiet mode
-n, --dryrun       dry-run mode

-I, --image=#      Docker image (required unless -D)
-D, --default      use default image
-E, --env=#        environment variable to inherit (repeatable)
-W, --mount-cwd    mount current working directory
-H, --mount-home   mount home directory
-U, --unmount      do not mount any directory
    --mount-mode=# mount mode (rw or ro, default: rw)
-R, --mount-ro     mount read-only (shortcut for --mount-mode=ro)
-V, --volume=#     additional volume to mount (repeatable)
-B, --batch        batch mode (non-interactive)
-L, --live         use live (persistent) container
-N, --name=#       live container name
-K, --kill         kill and remove existing container
-P, --port=#       port mapping (repeatable)
-O, --other=#      additional docker options (repeatable)

VERSION

Version 1.00

USAGE

When executed without arguments, Dôzo starts an interactive shell inside the container. When arguments are given, they are executed as a command.

dozo -I alpine                  # start shell
dozo -I alpine ls -la           # run command

By setting -D or your favorite image with -I in ~/.dozorc, you can simply run Dôzo without specifying an image. Since the git top directory is automatically mounted, git commands work as expected from anywhere in the tree.

$ dozo                          # start shell
$ dozo git log -p               # run git log -p

With -L option, you can use a persistent container. Tools installed in the container will remain available for subsequent use.

$ dozo -L                       # start shell and create container
# apt update && apt install -y cowsay
# exit
$ dozo -L /usr/games/cowsay Dôzo
 ______
< Dôzo >
 ------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

INSTALLATION

Using cpanminus:

cpanm -n App::dozo

To install the latest version from GitHub:

cpanm -n https://github.com/tecolicom/App-dozo.git

Alternatively, you can simply place dozo and getoptlong.sh in your PATH.

Dôzo requires Bash 4.3 or later.

DESCRIPTION

Dôzo is a generic Docker runner that simplifies running commands in Docker containers. The name comes from the Japanese word "dôzo" (どうぞ) meaning "please" or "go ahead", and also stands for "Docker with Zero Overhead". The command name is dozo for ease of typing.

It automatically configures the tedious Docker options such as volume mounts, environment variables, working directories, and interactive terminal settings, so you can focus on the command you want to run.

Dôzo is distributed as a standalone module and can be used as a general-purpose Docker runner. It was originally developed as part of App::Greple::xlate and is used by xlate for Docker operations.

Dôzo uses getoptlong.sh for option parsing.

Key Features

OPTIONS

LIVE CONTAINER

The -L option enables live (persistent) container mode. Unlike normal mode where containers are removed after execution (--rm), live containers persist between invocations, allowing you to maintain state and reduce startup overhead.

Container Lifecycle

When -L is specified, Dôzo behaves as follows:

Container Naming

Container names are automatically generated in the format:

<image_name>.<mount_directory>

For example, if you run:

dozo -I tecolicom/xlate -L

from /home/user/project, the container name would be xlate.project.

You can override the auto-generated name using the -N option:

dozo -I tecolicom/xlate -L -N mycontainer

Managing Live Containers

Interactive Mode

In live container mode, interactive mode (-i and -t flags for Docker) is automatically enabled when:

This allows seamless interactive use when attaching to containers or running interactive commands.

CONFIGURATION FILE

.dozorc files are loaded from the following locations in order:

For single-value options (like -I, -N), later values override earlier ones. For repeatable options (like -E, -V, -P, -O), all values are accumulated in order.

You can use any command line option in the configuration file:

# Example .dozorc
-I tecolicom/xlate:latest
-E CUSTOM_VAR=value
-V /data:/data

Lines starting with # are treated as comments.

DOCKER-IN-DOCKER

To use Docker commands inside the container, mount the host's Docker socket:

# .dozorc for Docker-in-Docker
-I docker
-V /var/run/docker.sock

This allows you to run Docker commands from within the container using the host's Docker daemon:

$ dozo docker run --rm alpine uname -a

Or run it as a one-liner without .dozorc:

$ dozo -I docker -V /var/run/docker.sock docker run --rm alpine uname -a

DEFAULT IMAGE

The tecolicom/xlate image is specifically designed for document translation and text processing tasks, providing a comprehensive environment with the following features:

Translation and AI Tools

Text Processing Tools

Greple Extensions

Multiple App::Greple extension modules are pre-installed:

Git Integration

The image includes a pre-configured git environment optimized for document comparison and review. Since Dôzo automatically mounts the git top directory by default, git commands work seamlessly with full repository context:

Additional Utilities

Environment

ENVIRONMENT

Configuration Variables

Inherited Variables

The following environment variables are inherited by default:

LANG TZ
HTTP_PROXY HTTPS_PROXY http_proxy https_proxy
TERM_PROGRAM TERM_BGCOLOR COLORTERM
DEEPL_AUTH_KEY OPENAI_API_KEY ANTHROPIC_API_KEY LLM_PERPLEXITY_KEY

Container Variables

The following environment variables are set inside the container:

SEE ALSO

xlate, App::Greple::xlate

getoptlong.sh

AUTHOR

Kazumasa Utashiro

LICENSE

Copyright © 2025-2026 Kazumasa Utashiro.

This software is released under the MIT License. https://opensource.org/licenses/MIT