Repository navigation
limitations
This document honestly describes the architectural limitations, edge cases, and known issues in DAM.
DAM fundamentally manages one core Compose project per directory.
By default, DAM executes docker compose without explicit -f flags, so standard override files (like docker-compose.override.yml or compose.override.yaml) are automatically detected and merged by Docker Compose itself.
If a directory contains multiple primary Compose files and you don't use the using modifier, Docker Compose natively processes only the first one it finds. See Default Compose Files in commands.md for the exact priority order.
The other primary files are ignored unless explicitly specified with the using modifier.
By default, app names are derived strictly from directory basenames. This means:
- No two apps can share the same directory name across different search roots
- Directory names must not contain spaces
- Renaming a directory effectively changes the app's identity
If you explicitly override the project name (using COMPOSE_PROJECT_NAME in a .env file or name: in your compose file), DAM will seamlessly respect this override. The folder name is the primary app name; a custom project name is also accepted as an alias when it does not collide with another folder name. list shows the folder name in APP and the custom name in PROJECT; status, get and the container state use the effective project name to find containers.
DAM is designed exclusively for standalone Docker Compose. It does not work with:
- Docker Swarm (
docker stack deploy) - Kubernetes
Discovery uses find -maxdepth "${MAX_SEARCH_DEPTH}" (which defaults to 3). Apps nested deeper than this setting below a search root will not be found. This depth limit can be increased by setting MAX_SEARCH_DEPTH in the configuration file. The maxdepth only applies to the depth below the search roots defined in SEARCH_DIRS.
Every qualifying directory within that depth is independently discovered. For example, beta/old/compose.yaml makes old an app even when it is only an archive below beta. If a directory should not be used as an app, add its basename to EXCLUDE_DIRS in /etc/docker-app-manager.conf to prevent discovery.
DAM invokes the Docker CLI and therefore honors the current Docker context and DOCKER_HOST configuration. However, DAM discovers applications and runs Compose on the machine where DAM itself is running. The app directories and Compose files (including any local files they reference, such as bind-mount sources) must be available on that machine. Pointing Docker at a remote daemon does not move those files to the remote host.
DAM does not provide a separate remote file discovery or deployment layer.
Docker Compose profiles (profiles: in the Compose file) are not explicitly handled by DAM. The docker compose up -d command (used by start) starts all services without profiles unless the COMPOSE_PROFILES environment variable is set.
DAM does not provide a custom CLI flag to specify profiles (e.g., dam start myapp --profile dev). However, because DAM relies on native Docker Compose, you can still use profiles by defining COMPOSE_PROFILES=your_profile in the app's .env file, which Docker Compose will automatically read.
DAM does not manage .env files or environment variable interpolation. These are handled natively by Docker Compose when it reads the Compose file. DAM simply changes to the directory and runs docker compose, so .env files in the app directory work as expected.
Docker Compose's include: directive (for splitting large Compose files) is handled natively by Docker Compose, not by DAM. DAM only detects the presence of the main Compose file - it does not parse or validate its contents.
DAM does not interact with docker compose watch or the develop: section. These are development-time features outside DAM's lifecycle management scope.
When multiple update*.sh scripts exist in a directory, DAM selects only the first one alphabetically via find | sort and takes the first result. If you have:
update-backup.shupdate-migrate.shupdate.sh
Only update-backup.sh will be executed. The others are ignored. If you need multiple steps, combine them into a single script.
The debug command is a placeholder that outputs "[TODO] Debug feature is coming soon." and returns success. It does not provide any debugging functionality.
1. Single Resource Fetching
You can only query exactly one raw resource type per command. Trying to chain them (like dkr get <app-name> cid vol) will explicitly fail. If you need multiple metrics, you must either run the command twice or use the info table.
2. Resource Output Format
The get command's output format differs based on whether a specific service is targeted:
- With
app:service→ raw value only - Without service →
service: valueformat
This inconsistency may complicate scripting if you're not expecting it.
The status command matches containers using Docker labels (com.docker.compose.project). This means:
- Apps that have never been started will show no containers
- Apps started outside of DAM (e.g., via
docker compose updirectly in the directory) will be matched normally (DAM seamlessly supports project name overrides if you used them).
If Docker is available, list enriches the output with container status. If Docker is not running, the list command still works for inventory but shows "inactive" for all apps.
The list command strictly outputs the primary Compose file detected during discovery (e.g., compose.yaml). Appending using <file1>... to a list command will not change the "COMPOSE FILE" column in the output.
These are fundamentally different operations:
| Operation | Docker Command | Scope |
|---|---|---|
delete <app> with vol |
docker compose down -v |
Project-level: only removes volumes from the Compose file |
cleanup vol |
docker volume prune -a -f |
Host-level: removes ALL unused volumes system-wide |
The with vol, with net, with img modifiers on delete are intentionally filtered out from the post-operation global cleanup. Only with buildx passes through. This is a safety measure documented in the source code.
This means delete all with vol net will:
- Run
docker compose down --remove-orphans -vfor each app (removes project volumes) - Run a basic dangling image cleanup globally
-
NOT run
docker volume pruneordocker network pruneglobally
DAM tries docker volume prune -a -f first, which removes all unused volumes (available in newer Docker versions). If that fails, it falls back to docker volume prune -f (without -a), which removes only anonymous/dangling volumes.
DAM tries docker buildx prune -a -f first. If that fails, it falls back to docker builder prune -a -f. This ensures compatibility with different Docker versions.
Important Limitations:
-
Default Builder Only: DAM only prunes the default BuildKit builder instance. It does not automatically detect or prune custom isolated builders (e.g., those created via
docker buildx create). -
No Advanced Flags: DAM strictly uses its own simplified arguments (e.g.,
cleanup buildx) and does not currently allow passing custom native arguments like--builder <name>,--filter, or--keep-storagethrough to the underlying prune command.
DAM is a Bash script and requires Bash specifically. It will not work with:
-
zsh(unless invoked asbash dam.sh) -
dash(common/bin/shon Ubuntu) fishsh
The shebang #!/usr/bin/env bash ensures Bash is used when the script is executed directly.
DAM is designed for and tested on Linux. While it may work on:
- macOS (if Bash 4.4+ is installed, e.g., via Homebrew - macOS ships with Bash 3.2)
- WSL2 (Windows Subsystem for Linux)
These platforms are not explicitly supported or tested.
DAM uses ANSI escape codes for colored output. These may not render correctly in:
- Non-terminal outputs (log files, CI/CD outputs without ANSI support)
- Terminals that don't support ANSI codes
- Windows terminals (without ANSI support)
update*.sh scripts are executed via bash with the current user's privileges. There is no sandboxing, validation, or content inspection. If DAM is run as root, custom scripts run as root.
The config file at /etc/docker-app-manager.conf is sourced as Bash code. DAM verifies that it is owned by root and is not group- or world-writable before sourcing it. A privileged actor can still change the file and execute code the next time DAM runs.
If UPDATE_SHA256 is not set (the default), self-update performs only basic validation (shebang check, syntax check). It does not verify the integrity of the downloaded script against a known-good hash.
-
Race condition in multi-app operations: If Docker resources are shared between apps (e.g., external networks), operating on multiple apps simultaneously could cause unexpected behavior. DAM processes apps sequentially, which mitigates but doesn't eliminate this risk.
-
Orphan detection:
--remove-orphansonly removes orphan containers for the current project. If a service was renamed and the old container was started by a different tool, it may not be detected as an orphan. -
get_app_compose_filewith update-only apps: If a directory has no Compose file but has anupdate*.shscript,get_app_compose_file()returns the basename of the update script. This is used in thelistoutput where it may appear confusing (showing a.shfile in the "COMPOSE" column). -
App Name Casing and Collisions: DAM uses a hybrid approach to find your apps. It looks for an exact case match first, and if that fails, it falls back to case-insensitive matching. This affects directories with similar names (e.g., you have both
n8nandN8nfolders):-
Docker's rule: Docker Compose strictly lowercases all project names. If you have an
n8nfolder and anN8nfolder, Docker Compose thinks they are the exact same project (n8n). If you try to run both, Docker will destroy one stack to deploy the other! -
The solution: You can have both folders, but you must set a custom project name for one of them (e.g., adding
name: n8n-prodinside theN8nfolder's compose file). -
How DAM handles it: Because DAM checks exact matches first, if you type
dkr start N8n, DAM instantly finds theN8nfolder (where you set the custom name). If you typedkr start n8n, DAM finds then8nfolder. If you make a typo and typedkr start n8N, exact match fails, so DAM tries case-insensitive matching. Since it matches both folders, DAM safely reports an ambiguity error rather than guessing which one you meant. On the other hand, if you only have one foldern8nand typedkr start N8N, the case-insensitive fallback finds exactly one match and safely starts it!
-
Docker's rule: Docker Compose strictly lowercases all project names. If you have an
-
Concurrent DAM invocations: Running multiple DAM instances simultaneously for the same apps could cause conflicts. There is no locking mechanism.
-
The
usingmodifier file priority: A bare file like<name>.ymlwill take precedence over a prefixed file likecompose.<name>.ymlwhen using a shorthand likeusing <name>. See TheusingModifier in commands.md for the exact resolution priority order. -
The
usingmodifier with partial matches: If you provide multiple files (e.g.,using base prod) and an app only hasbase.ymlbut notprod.yml, DAM will strictly run with justbase.ymland print a warning thatprodwas not found for that specific app. If none of the requested files are found, onlystop,recreate,force-recreate, anddeletefail rather than falling back to the default Compose file; other actions keep the fallback. At the very end of the run, DAM prints a global summary explicitly listing which specific apps were missing the file.