File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/docker_container.cpython-310.pyc
Back
o ;j�T � @ s� d Z ddlZddlZddlZddlZddlZddlmZ e� e �ZdZdZ dd� Zdd � Zd d� Zdd � Zdd� Zddddddddejjjdf dd�Zddddddddejjjf dd�Z ddd�Zddd�Zddd�ZdS ) a Management of Docker containers .. versionadded:: 2017.7.0 :depends: docker_ Python module .. note:: Older releases of the Python bindings for Docker were called docker-py_ in PyPI. All releases of docker_, and releases of docker-py_ >= 1.6.0 are supported. These python bindings can easily be installed using :py:func:`pip.install <salt.modules.pip.install>`: .. code-block:: bash salt myminion pip.install docker To upgrade from docker-py_ to docker_, you must first uninstall docker-py_, and then install docker_: .. code-block:: bash salt myminion pip.uninstall docker-py salt myminion pip.install docker .. _docker: https://pypi.python.org/pypi/docker .. _docker-py: https://pypi.python.org/pypi/docker-py These states were moved from the :mod:`docker <salt.states.docker>` state module (formerly called **dockerng**) in the 2017.7.0 release. When running the :py:func:`docker_container.running <salt.states.docker_container.running>` state for the first time after upgrading to 2017.7.0, your container(s) may be replaced. The changes may show diffs for certain parameters which say that the old value was an empty string, and the new value is ``None``. This is due to the fact that in prior releases Salt was passing empty strings for these values when creating the container if they were undefined in the SLS file, where now Salt simply does not pass any arguments not explicitly defined in the SLS file. Subsequent runs of the state should not replace the container if the configuration remains unchanged. .. note:: To pull from a Docker registry, authentication must be configured. See :ref:`here <docker-authentication>` for more information on how to configure access to docker registries in :ref:`Pillar <pillar>` data. � N)�CommandExecutionErrorZdocker_container)Zmoby_containerc C s dt v rtS dt �d�fS )z? Only load if the docker execution module is available �docker.versionF)�__salt__�__virtualname__Zmissing_fun_string� r r �P/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/docker_container.py�__virtual__@ s r c C sD t |t�r|| d<