HEX
Server: Apache
System: Linux server.enlacediseno.com 4.18.0-553.62.1.el8_10.x86_64 #1 SMP Wed Jul 16 04:08:25 EDT 2025 x86_64
User: maor (1069)
PHP: 7.3.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/proxy/docker.py
"""
Docker Proxy Minion

.. versionadded:: 2019.2.0

:depends: docker

This proxy minion is just a shim to the docker executor, which will use the
:py:func:`docker.call <salt.modules.dockermod.call>` for everything except
state runs.


To configure the proxy minion:

.. code-block:: yaml

    proxy:
      proxytype: docker
      name: festive_leakey

It is also possible to just name the proxy minion the same name as the
container, and use grains to configure the proxy minion:

.. code-block:: yaml

    proxy:
        proxytype: docker
        name: {{grains['id']}}

name

    Name of the docker container
"""

__proxyenabled__ = ["docker"]
__virtualname__ = "docker"

__deprecated__ = (
    3009,
    "docker",
    "https://github.com/saltstack/saltext-docker",
)


def __virtual__():
    if __opts__.get("proxy", {}).get("proxytype") != __virtualname__:
        return False, f"Proxytype does not match: {__virtualname__}"
    return True


def module_executors():
    """
    List of module executors to use for this Proxy Minion
    """
    return [
        "docker",
    ]


def init(opts):
    """
    Always initialize
    """
    __context__["initialized"] = True


def initialized():
    """
    This should always be initialized
    """
    return __context__.get("initialized", False)


def shutdown(opts):
    """
    Nothing needs to be done to shutdown
    """
    __context__["initialized"] = False