- Implemented update of container settings (i.e. memory limit, cpu shares) without a need for resetting the container, where supported by more recent Docker hosts.
- Version-dependent client features such as volumes and networks have been consolidated into a dictionary-type
- Added support for the Docker SDK for Python 2.x. Version 1.x is still supported. Using 2.x and a sufficiently recent
Docker host adds the following functionality:
restart_policysetting in the host config can be updated at runtime.
stop_timeoutis passed to the container on creation. Whereas Docker-Map has been supporting this setting for a while now, this will also apply when manually stopping a container (e.g. through the command line).
healthcheck: Adds a health check command to containers, if the Docker host and the API client supports it.
start_delay: Simply adds a delay of x seconds after a container has been started. Can be used on older Docker hosts to prevent race conditions during container linking.
- Added Dockerfile properties
healthcheck. There is however no verification if the Docker host supports these commands.
- Added serialization: Container maps now have a method
as_dict(), that return all contents as a nested Python dictionary structure. Passing this in as the
ContainerMapyields a copy of the original map.
- Input validation and conversion is no longer performed immediately when configuration properties are being set, but
deferred to a later step. This will likely not have any practical implications for most users, since conversion
still happens automatically before merge operations and before the configuration is being used. It can also be invoked
- All tuple input lists from
dockermap.map.inputnow accept dictionaries with their named parameters as input.
- For consistency with other properties, the order of arguments in the
HostConfigtuple have been changed. It is not
- Fixed Python 3 compatibility.
- Minor internal refactoring.
- Restart uses the configured stop signal for the container.
- Added option to restart exec commands on container restart.
- The result (i.e. the id) of exec commands is now returned by the runner.
- Added checks on configured ip addresses and link-local ips. Additional general improvements to container network endpoint check against configuration.
- Added checks on volume driver and driver options.
- After an unsuccessful stop attempt, added another wait period so that the container has time to process the
SIGKILLsignal issued by Docker.
- Process a single
MapConfigIdas valid input.
pull_images()action also pulls present images by default (i.e. updates them from the registry). This was optional before, and can be prevented by passing
pull_all_images=False, only pulling missing image tags.
- Internal cleanup of converting input into configuration ids.
- Included main process id in state data, so that implementations can detect a container restart more easily.
- Handling deprecation of the
forceargument when tagging images in newer Docker releases. The tag is added automatically depending on the detected API version.
- Fixed update check of container network mode referring to another container.
- Additional minor bugfix from previous prereleases.
volumes: Where the Docker host supports it, volumes can now be configured with additional properties such as driver and options. The original workaround of Docker containers sharing anonymous volumes no longer applies in this case.
- The default path of volumes in
attachesvolumes can now be defined, by using a dictionary or list of tuples. They no longer have to (but still can) be set in
- Where the Docker host supports named volumes, container-side paths of
usesitems can be overridden, provided that they are referring to attached volumes created through another container.
ContainerConfiguration. It caused too much complexity in responding to supported client features. In addition, it was likely to break dependency paths.
clientsis however still available.
MappingDockerClientnow wraps all exceptions so that partial results, i.e. actions that already have been performed on clients. It raises a
ActionRunnerException, which provides information about the client and action performed, partial results through
results(), but also the possibility to re-trigger the original traceback using
- Similarly, direct calls to the utility client
DockerClientWrapper, such as
cleanup_containers()now return a
signal()method to client.
- Images have been integrated into the dependency resolution. Images of a container and all of its dependencies can
now be pulled with the new command
- Authentication information for the Docker registry can now be added to
dockermap.map.config.client.ClientConfiguration.auth_configsand are considered during login and image pull actions.
- Added a built-in group
__all__, that applies to all containers or even all configured maps on
- Several adaptions which makes it easier for programs and libraries using the API to evaluate changes.
- More fixes to image dependency check, so that
cleanup_images()now works reliably. Removals can also be forced where applicable.
- Implemented CLI, missing from 0.8.0b1.
- Various bugfixes from 0.8.0b1.
groups: Generally an action (e.g. startup of containers) can now be run at once on multiple items. In order to make input easier, groups can be added to a map that refers to multiple configurations. Dependencies that multiple items have in common will only be followed once.
- Added forced update: Not all differences between the container configuration and an existing instance can be detected
automatically. A parameter
force_updatecan now trigger an update of particular containers.
networks: Docker networks can now be configured on a map. Referring to them in the property
networksfrom one or multiple container configurations will create them automatically. The former
networksetting has been renamed to
- More sensible solution of Issue #15, not changing user-defined link aliases. Doing so could cause name resolution issues.
- Fixed case where
exec_createdoes not return anything, as when commands are started immediately (e.g. the CLI, Issue #17).
- Improved accuracy of comparing the container command from the configuration with the container inspection info.
- Added parser for CLI
topcommand, as needed for inspecting exec commands.
- Fixed recursive dependency resolution order.
- Setting an alias name is always optional for container links, even if
ContainerLinkstuple is used directly.
versionmethod to command line generator.
Internal refactoring: Moved configuration elements to individual modules. If you get any import errors from this update, please check if you are using convenience imports such as
from dockermap.api import ContainerMapinstead of the modules where the classes are implemented.
ContainerMap.containersattribute access to work as documented.
The default iteration behavior has also changed. Similar to
ContainerMap.volumes, it generates items. Before iteration was returning keys, as usual for dictionaries.
Fixes for use of alternative client implementations (e.g. CLI, Issue #12).
linkargument for command line generator (Issue #13).
Added replacement for invalid characters in generated host names (Issue #15).
- Refactoring of policy framework. The monolithic client action functions have been divided into separate modules for improving maintainability and testing. This also makes it easier to add more functionality. A few minor issues with updating containers and executing commands were resolved during this change.
- Added an experimental command line generator.
- Added evaluation of
- Several bugfixes from 0.6.6b1.
- Added arguments to set additional image tags after build.
default_tagproperty to container maps.
- Minor refactoring. Possibly breaks compatibility in custom policy implementations:
dockermap.map.policy.cache.CachedImages.reset_latesthas been renamed to
pull_latesthas been renamed to
dockermap.map.policy.update.ContainerUpdateMixin.pull_latesthas been renamed to
dockermap.map.policy.base.BasePolicy.inamehas been renamed to
image_name()and changed order of arguments for allowing defaults.
- Better support for IPv6 addresses. Added
ipv6flag to port bindings and
interfaces_ipv6property to client configuration.
- Command elements are converted into strings so that Dockerfiles with a numeric command line element do not raise errors.
- Fixed exception on stopping a container configuration when the container does not exist.
- Improved fixed behavior when merging container maps and embedded container configurations. Can also be used for creating copies.
- Fixed transfer of configuration variables into client instance.
stop_signalfor customizing the signal that is used for shutting down or restarting containers.
- Minor changes in docs and log messages.
- Fixed image cache update with multiple tags.
- Bugfix in Dockerfile module.
- Many more Python 3 fixes (PR #10).
- Cleaned up logging; only using default levels.
- Port bindings are passed as lists to the API, allowing container ports to be published to multiple host ports and interfaces.
exec_commandsto start additional commands (e.g. scripts) along with the container.
- Container links are now passed as lists to the API, so that the same container can be linked with multiple aliases.
- Various compatibility fixes with Python 3 (PR #9).
- Bugfixes on container restart and configuration merge.
- Bugfixes for network mode and volume check of inherited configurations.
- Fixed deprecation warnings from
- Added option to prepare attached volumes with local commands instead of temporary containers, for clients that support it.
- Added network modes and their dependencies. Attached volumes are no longer enabled for networking.
- Added per-container stop timeout. Also applies to restart.
- Adjusted volume path inspection to use
Mountson newer Docker API versions. Fixes issues with the update policy.
- Implemented HostConfig during container creation, which is preferred over passing arguments during start since API v1.15. For older API versions, start keyword arguments will be used.
- Added configuration inheritance and abstract configurations.
- Changed log functions to better fit Python logging.
- Minor fixes in merge functions.
- Bug fix in tag / repository partitioning (PR #7).
- Added automated container start, log, and removal for scripts or single commands.
- Added separate exception type for map integrity check failures.
- Aliases for host volumes are now optional.
- Minor bugfixes in late value resolution, container cleanup, and input conversion.
- Added check for changes in environment, command, and network settings in update policy.
- Added optional pull before new container creation.
- Revised dependency resolution for avoiding duplicate actions and detecting circular dependencies more reliably.
- Fix for handling missing container names in cleanup method.
- Allow for merging empty dictionary keys.
- Fix for missing container names and tags.
- Exclude default client name from host name.
- Fixed error handling in build (issue #6).
command_workdirfor setting the working directory in DockerFiles.
- Enhanced file adding functions in DockerFile to return build context paths.
- Fixed volume consistency check in update policy.
- Additional minor updates.
- Possibility to use ‘lazy’ values in various settings (e.g. port bindings, volume aliases, host volumes, and user).
- Consider read-only option for inherited volumes in
- Further update policy fixes.
- Python 3 compatibility fixes (PR #4).
- Added convenience imports in
- Added host and domain name setting.
- Improved update requirement detection.
- Fixed restart policy.
- Moved container handling logic to policy classes.
- Better support for multiple maps and multiple clients.
updateactions, referring to variable policy implementations.
persistentflag to container configurations to differentiate during cleanup processes.
- Added methods for merging container maps and configurations.
- It is no longer required to use the wrapped client
- More flexible logging.
- Minor fix in
- Only setup fix, no functional changes.
- Various bugfixes related to repository prefix, shortcuts, users.
- Added YAML import.
- Added default host root path and repository prefix.
- Added Docker registry actions to wrapper.
- Fixed issues related to starting containers.