Docker CE¶
Overview¶
Docker CE is an open-source containerization technology for building and containerizing your applications.
Deployment¶
Saltbox dependency.
sb install docker
Usage¶
docker
FAQ¶
Why does Saltbox use the Docker network "saltbox" instead of bridge?
- This keeps all Saltbox containers organized under one network
- the docker bridge network does not allow network aliases.
Role Defaults¶
Variables can be customized using the Inventory. (1)
-
Example override
docker_dns: ["item1", "item2"]Avoid overriding variables ending in
_defaultWhen overriding variables that end in
_default(likedocker_docker_envs_default), you replace the entire default configuration. Future updates that add new default values will not be applied to your setup, potentially breaking functionality.Instead, use the corresponding
_customvariable (likedocker_docker_envs_custom) to add your changes. Custom values are merged with defaults, ensuring you receive updates.
docker_dns
# Format is ["8.8.8.8", "8.8.4.4"]
# Type: list
docker_dns: []
docker_config_custom
# YAML Dictionary that gets combined with the defaults and later converted to json
# Example of how to remove an option:
# docker_config_custom:
# log-opts: "{{ omit }}"
# Example of how to add options:
# docker_config_custom:
# debug: "true"
# Type: dict
docker_config_custom: {}
docker_cpus_default
# CPU and Memory defaults
# Type: string
docker_cpus_default: ""
docker_memory_default
# Type: string
docker_memory_default: ""
docker_skip_start_during_meta_tag
# Skip Container startup during core, saltbox, mediabox or feederbox
# If the kernel has been updated and a reboot will happen
# Type: string
docker_skip_start_during_meta_tag: "{{ saltbox_auto_reboot }}"
docker_create_image_prune
# Toggles pruning of dangling images after container creation.
# Type: bool (true/false)
docker_create_image_prune: true
docker_create_image_prune_delay
# Type: bool (true/false)
docker_create_image_prune_delay: true
docker_create_image_prune_delay_timeout
# Type: int
docker_create_image_prune_delay_timeout: 10
When no saved assignment exists, the role allocates the first available port within the inclusive low and high bounds and retains it for future runs. Override an instance's bounds to control new allocation; set both bounds to the same value to require one exact port.
Existing assignments are stored in /opt/saltbox/port-assignments.json. A conflict-free saved port remains authoritative even outside the current bounds, including a port manually changed in that file.
If a saved assignment conflicts, another available port is selected from the current bounds and a warning shows the old port, new port, and conflict source.
docker_dns_port_low_bound
# Type: int
docker_dns_port_low_bound: 8190
docker_dns_port_high_bound
# Type: int
docker_dns_port_high_bound: 8280