docker-composer 0.8.4__tar.gz → 2.17.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. {docker-composer-0.8.4 → docker_composer-2.17.2}/PKG-INFO +8 -8
  2. {docker-composer-0.8.4 → docker_composer-2.17.2}/pyproject.toml +9 -8
  3. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/_utils/argument.py +4 -1
  4. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/_utils/generate_class.py +20 -17
  5. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/base.py +0 -2
  6. docker_composer-2.17.2/src/docker_composer/runner/cmd/build.py +38 -0
  7. docker_composer-2.17.2/src/docker_composer/runner/cmd/config.py +53 -0
  8. docker_composer-2.17.2/src/docker_composer/runner/cmd/cp.py +29 -0
  9. docker_composer-2.17.2/src/docker_composer/runner/cmd/create.py +39 -0
  10. docker_composer-2.17.2/src/docker_composer/runner/cmd/down.py +29 -0
  11. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/runner/cmd/events.py +3 -5
  12. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/runner/cmd/exec.py +10 -15
  13. docker_composer-2.17.2/src/docker_composer/runner/cmd/images.py +25 -0
  14. docker_composer-2.17.2/src/docker_composer/runner/cmd/kill.py +25 -0
  15. docker_composer-2.17.2/src/docker_composer/runner/cmd/logs.py +38 -0
  16. docker_composer-2.17.2/src/docker_composer/runner/cmd/ls.py +30 -0
  17. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/runner/cmd/pause.py +4 -6
  18. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/runner/cmd/port.py +6 -9
  19. docker_composer-2.17.2/src/docker_composer/runner/cmd/ps.py +35 -0
  20. docker_composer-2.17.2/src/docker_composer/runner/cmd/pull.py +32 -0
  21. docker_composer-2.17.2/src/docker_composer/runner/cmd/push.py +29 -0
  22. docker_composer-2.17.2/src/docker_composer/runner/cmd/restart.py +25 -0
  23. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/runner/cmd/rm.py +7 -14
  24. docker_composer-2.17.2/src/docker_composer/runner/cmd/run.py +66 -0
  25. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/runner/cmd/start.py +4 -6
  26. docker_composer-2.17.2/src/docker_composer/runner/cmd/stop.py +21 -0
  27. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/runner/cmd/top.py +3 -5
  28. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/runner/cmd/unpause.py +4 -6
  29. docker_composer-2.17.2/src/docker_composer/runner/cmd/up.py +85 -0
  30. docker_composer-2.17.2/src/docker_composer/runner/cmd/version.py +25 -0
  31. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/runner/root.py +263 -388
  32. docker-composer-0.8.4/setup.py +0 -37
  33. docker-composer-0.8.4/src/docker_composer/docker-composer.iml +0 -11
  34. docker-composer-0.8.4/src/docker_composer/runner/cmd/__init__.py +0 -0
  35. docker-composer-0.8.4/src/docker_composer/runner/cmd/build.py +0 -55
  36. docker-composer-0.8.4/src/docker_composer/runner/cmd/bundle.py +0 -35
  37. docker-composer-0.8.4/src/docker_composer/runner/cmd/config.py +0 -42
  38. docker-composer-0.8.4/src/docker_composer/runner/cmd/create.py +0 -37
  39. docker-composer-0.8.4/src/docker_composer/runner/cmd/down.py +0 -48
  40. docker-composer-0.8.4/src/docker_composer/runner/cmd/help.py +0 -21
  41. docker-composer-0.8.4/src/docker_composer/runner/cmd/images.py +0 -24
  42. docker-composer-0.8.4/src/docker_composer/runner/cmd/kill.py +0 -24
  43. docker-composer-0.8.4/src/docker_composer/runner/cmd/logs.py +0 -34
  44. docker-composer-0.8.4/src/docker_composer/runner/cmd/ps.py +0 -33
  45. docker-composer-0.8.4/src/docker_composer/runner/cmd/pull.py +0 -37
  46. docker-composer-0.8.4/src/docker_composer/runner/cmd/push.py +0 -25
  47. docker-composer-0.8.4/src/docker_composer/runner/cmd/restart.py +0 -24
  48. docker-composer-0.8.4/src/docker_composer/runner/cmd/run.py +0 -70
  49. docker-composer-0.8.4/src/docker_composer/runner/cmd/scale.py +0 -32
  50. docker-composer-0.8.4/src/docker_composer/runner/cmd/stop.py +0 -26
  51. docker-composer-0.8.4/src/docker_composer/runner/cmd/up.py +0 -94
  52. docker-composer-0.8.4/src/docker_composer/runner/cmd/version.py +0 -25
  53. {docker-composer-0.8.4 → docker_composer-2.17.2}/LICENSE.txt +0 -0
  54. {docker-composer-0.8.4 → docker_composer-2.17.2}/README.md +0 -0
  55. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/__init__.py +0 -0
  56. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/_utils/__init__.py +0 -0
  57. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/py.typed +0 -0
  58. {docker-composer-0.8.4 → docker_composer-2.17.2}/src/docker_composer/runner/__init__.py +0 -0
@@ -1,26 +1,26 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: docker-composer
3
- Version: 0.8.4
3
+ Version: 2.17.2
4
4
  Summary: Use docker-compose from within Python
5
5
  Home-page: https://github.com/schollm/docker-composer
6
6
  License: Apache-2.0
7
7
  Author: Micha
8
8
  Author-email: schollm-git@gmx.com
9
- Requires-Python: >=3.6,<4.0
10
- Classifier: Development Status :: 4 - Beta
9
+ Requires-Python: >=3.9,<4.0
10
+ Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: System Administrators
13
13
  Classifier: License :: OSI Approved :: Apache Software License
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.6
17
- Classifier: Programming Language :: Python :: 3.7
18
- Classifier: Programming Language :: Python :: 3.8
19
16
  Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3
20
20
  Classifier: Topic :: Software Development :: Build Tools
21
21
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
22
- Requires-Dist: attrs (>=20.3.0,<21.0.0)
23
- Requires-Dist: loguru (>=0.5.3,<0.6.0)
22
+ Requires-Dist: attrs (>=20.3.0)
23
+ Requires-Dist: loguru (>=0.5.3)
24
24
  Project-URL: Repository, https://github.com/schollm/docker-composer
25
25
  Description-Content-Type: text/markdown
26
26
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "docker-composer"
3
- version = "0.8.4"
3
+ version = "2.17.2"
4
4
  description = "Use docker-compose from within Python"
5
5
  authors = ["Micha <schollm-git@gmx.com>"]
6
6
  readme = "README.md"
@@ -18,19 +18,20 @@ classifiers = [
18
18
  "Topic :: Software Development :: Build Tools",
19
19
  "Topic :: Software Development :: Libraries :: Application Frameworks",
20
20
  "Operating System :: OS Independent",
21
- "Development Status :: 4 - Beta"
21
+ "Development Status :: 5 - Production/Stable"
22
22
  ]
23
23
 
24
24
 
25
25
  [tool.poetry.dependencies]
26
- python = "^3.6"
27
- attrs = "^20.3.0"
28
- loguru = "^0.5.3"
26
+ python = ">=3.9,<4.0"
27
+ attrs = ">=20.3.0"
28
+ loguru = ">=0.5.3"
29
29
 
30
30
  [tool.poetry.dev-dependencies]
31
- pytest = "^6.1.2"
32
- black = "^20.8b1"
33
- isort = "^5.6.4"
31
+ flake8 = "^6.0.0"
32
+ pytest = ">=6.1.2"
33
+ black = ">=20.8b1"
34
+ isort = ">=5.6.4"
34
35
 
35
36
  [build-system]
36
37
  requires = ["poetry-core>=1.0.0"]
@@ -29,6 +29,9 @@ _TYPE_CONVERSIONS = {
29
29
  "int": int,
30
30
  "list": list,
31
31
  "str": str,
32
+ "stringArray": list[str],
33
+ "volumes": list[str],
34
+ "docker": bool,
32
35
  }
33
36
 
34
37
 
@@ -72,7 +75,7 @@ def _collect_arguments(arguments: Iterable[str]) -> Iterator[str]:
72
75
  """Combine argument lines to obtain one line per argument"""
73
76
  res = ""
74
77
  for arg in arguments:
75
- if res and arg[:6].strip().startswith("-"):
78
+ if res and arg[:12].strip().startswith("-"):
76
79
  yield res.strip()
77
80
  res = ""
78
81
  res += f"\n {arg.strip()}"
@@ -1,10 +1,9 @@
1
- import os
2
1
  import subprocess
3
2
  from collections import defaultdict
4
3
  from functools import lru_cache, reduce
5
4
  from operator import add
6
5
  from pathlib import Path
7
- from typing import Iterable, Iterator, List, Mapping, Optional, Set, Tuple, Union
6
+ from typing import Iterable, Iterator, List, Mapping, Set, Tuple, Union
8
7
 
9
8
  import black
10
9
  import isort
@@ -38,8 +37,11 @@ def get_help_message(subcommand: str = "") -> str:
38
37
  args = [arg for arg in ["docker-compose", subcommand, "--help"] if arg]
39
38
  process = subprocess.run(args, capture_output=True, text=True)
40
39
  if process.returncode:
41
- logger.error(process.returncode)
40
+ logger.error(
41
+ "docker-compose {} --help exited with {}:", subcommand, process.returncode
42
+ )
42
43
  logger.error(process.stderr)
44
+
43
45
  return process.stdout
44
46
 
45
47
 
@@ -51,7 +53,9 @@ def collect_help_lines(msg: str) -> Mapping[str, List[str]]:
51
53
  parts: Mapping[str, List[str]] = defaultdict(list)
52
54
  part = "general"
53
55
  for line in msg.split("\n"):
54
- if line and line[0] != " " and line.endswith(":") and " " not in line:
56
+ if not line:
57
+ part = "general"
58
+ elif " " not in line and line.endswith(":"):
55
59
  part = line[:-1].lower()
56
60
  else:
57
61
  parts[part].append(line)
@@ -181,7 +185,9 @@ class {class_name}(DockerBaseRunner):
181
185
  level=level,
182
186
  )
183
187
  try:
184
- res = isort.code(res, config=isort.Config(settings_path=project_root()))
188
+ res = isort.code(
189
+ res, config=isort.Config(settings_path=project_root().as_posix())
190
+ )
185
191
  except ISortError as exc:
186
192
  logger.exception(exc)
187
193
  try:
@@ -191,7 +197,7 @@ class {class_name}(DockerBaseRunner):
191
197
  return res
192
198
 
193
199
 
194
- def write_class(cmd: str, file_name: Optional[str] = None) -> None:
200
+ def write_class(cmd: str) -> None:
195
201
  """
196
202
  Generate a class for `cmd` and write it to `file_name`
197
203
 
@@ -199,18 +205,15 @@ def write_class(cmd: str, file_name: Optional[str] = None) -> None:
199
205
  :param file_name: Name of output file (empty/None for auto-generation)
200
206
  :return:
201
207
  """
202
- if not file_name:
203
- file_name = os.path.join(
204
- os.path.dirname(__file__),
205
- "..",
206
- "runner",
207
- "cmd" if cmd else "",
208
- f"{cmd or 'root'}.py",
209
- )
208
+ base_path = Path(__file__).parents[1] / "runner"
209
+ if cmd:
210
+ file_name = base_path / "cmd" / f"{cmd}.py"
211
+ else:
212
+ file_name = base_path / "root.py"
213
+
210
214
  class_str = generate_class(f"DockerCompose{(cmd or 'root').capitalize()}", cmd)
211
- logger.info("Write {:<8s} -> {}", cmd or "root", file_name)
212
- with open(file_name, "w") as f:
213
- f.write(class_str)
215
+ logger.info("Write {:<8s} -> {}", cmd, file_name)
216
+ file_name.write_text(class_str, encoding="utf-8")
214
217
 
215
218
 
216
219
  def main() -> None:
@@ -56,7 +56,6 @@ class DockerBaseRunner:
56
56
  stdin=None,
57
57
  stdout=None,
58
58
  stderr=None,
59
- capture_output=False,
60
59
  **kwargs,
61
60
  ) -> subprocess.CompletedProcess:
62
61
  """Call docker-compose with the generated command
@@ -76,7 +75,6 @@ class DockerBaseRunner:
76
75
  stdin=stdin,
77
76
  stdout=stdout,
78
77
  stderr=stderr,
79
- capture_output=capture_output,
80
78
  **kwargs,
81
79
  )
82
80
  logger.debug("Returned from {}: {}", cmd[0], p.returncode)
@@ -0,0 +1,38 @@
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
+
4
+ from typing import List, Optional
5
+
6
+ import attr
7
+
8
+ from docker_composer.base import DockerBaseRunner
9
+
10
+
11
+ @attr.s(auto_attribs=True)
12
+ class DockerComposeBuild(DockerBaseRunner):
13
+ """
14
+ Usage: docker compose build [OPTIONS] [SERVICE...]
15
+ Build or rebuild services
16
+ """
17
+
18
+ build_arg: Optional[list] = None
19
+ """Set build-time variables for services."""
20
+ no_cache: Optional[bool] = None
21
+ """Do not use cache when building the image"""
22
+ progress: Optional[str] = None
23
+ """Set type of progress output (auto, tty, plain, quiet) (default "auto")"""
24
+ pull: Optional[bool] = None
25
+ """Always attempt to pull a newer version of the image."""
26
+ push: Optional[bool] = None
27
+ """Push service images."""
28
+ quiet: Optional[bool] = None
29
+ """Don't print anything to STDOUT"""
30
+ ssh: Optional[str] = None
31
+ """Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent)"""
32
+ _cmd: str = "build"
33
+ _options: List[str] = [
34
+ "no_cache",
35
+ "pull",
36
+ "push",
37
+ "quiet",
38
+ ]
@@ -0,0 +1,53 @@
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
+
4
+ from typing import List, Optional
5
+
6
+ import attr
7
+
8
+ from docker_composer.base import DockerBaseRunner
9
+
10
+
11
+ @attr.s(auto_attribs=True)
12
+ class DockerComposeConfig(DockerBaseRunner):
13
+ """
14
+ Usage: docker compose config [OPTIONS] [SERVICE...]
15
+ Parse, resolve and render compose file in canonical format
16
+ """
17
+
18
+ format: Optional[str] = None
19
+ """Format the output. Values: [yaml | json] (default "yaml")"""
20
+ hash: Optional[str] = None
21
+ """Print the service config hash, one per line."""
22
+ images: Optional[bool] = None
23
+ """Print the image names, one per line."""
24
+ no_consistency: Optional[bool] = None
25
+ """Don't check model consistency - warning: may produce invalid Compose output"""
26
+ no_interpolate: Optional[bool] = None
27
+ """Don't interpolate environment variables."""
28
+ no_normalize: Optional[bool] = None
29
+ """Don't normalize compose model."""
30
+ output: Optional[str] = None
31
+ """Save to file (default to stdout)"""
32
+ profiles: Optional[bool] = None
33
+ """Print the profile names, one per line."""
34
+ quiet: Optional[bool] = None
35
+ """Only validate the configuration, don't print anything."""
36
+ resolve_image_digests: Optional[bool] = None
37
+ """Pin image tags to digests."""
38
+ services: Optional[bool] = None
39
+ """Print the service names, one per line."""
40
+ volumes: Optional[bool] = None
41
+ """Print the volume names, one per line."""
42
+ _cmd: str = "config"
43
+ _options: List[str] = [
44
+ "images",
45
+ "no_consistency",
46
+ "no_interpolate",
47
+ "no_normalize",
48
+ "profiles",
49
+ "quiet",
50
+ "resolve_image_digests",
51
+ "services",
52
+ "volumes",
53
+ ]
@@ -0,0 +1,29 @@
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
+
4
+ from typing import List, Optional
5
+
6
+ import attr
7
+
8
+ from docker_composer.base import DockerBaseRunner
9
+
10
+
11
+ @attr.s(auto_attribs=True)
12
+ class DockerComposeCp(DockerBaseRunner):
13
+ """
14
+ Usage: docker compose cp [OPTIONS] SERVICE:SRC_PATH DEST_PATH|-
15
+ docker compose cp [OPTIONS] SRC_PATH|- SERVICE:DEST_PATH
16
+ Copy files/folders between a service container and the local filesystem
17
+ """
18
+
19
+ archive: Optional[bool] = None
20
+ """Archive mode (copy all uid/gid information)"""
21
+ follow_link: Optional[bool] = None
22
+ """Always follow symbol link in SRC_PATH"""
23
+ index: Optional[int] = None
24
+ """Index of the container if there are multiple instances of a service ."""
25
+ _cmd: str = "cp"
26
+ _options: List[str] = [
27
+ "archive",
28
+ "follow_link",
29
+ ]
@@ -0,0 +1,39 @@
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
+
4
+ from typing import List, Optional
5
+
6
+ import attr
7
+
8
+ from docker_composer.base import DockerBaseRunner
9
+
10
+
11
+ @attr.s(auto_attribs=True)
12
+ class DockerComposeCreate(DockerBaseRunner):
13
+ """
14
+ Usage: docker compose create [OPTIONS] [SERVICE...]
15
+ Creates containers for a service.
16
+ """
17
+
18
+ build: Optional[bool] = None
19
+ """Build images before starting containers."""
20
+ force_recreate: Optional[bool] = None
21
+ """Recreate containers even if their configuration and image haven't changed."""
22
+ no_build: Optional[bool] = None
23
+ """Don't build an image, even if it's missing."""
24
+ no_recreate: Optional[bool] = None
25
+ """If containers already exist, don't recreate them. Incompatible with --force-recreate."""
26
+ pull: Optional[str] = None
27
+ """Pull image before running ("always"|"missing"|"never") (default "missing")"""
28
+ remove_orphans: Optional[bool] = None
29
+ """Remove containers for services not defined in the Compose file."""
30
+ scale: Optional[str] = None
31
+ """Scale SERVICE to NUM instances. Overrides the scale setting in the Compose file if present."""
32
+ _cmd: str = "create"
33
+ _options: List[str] = [
34
+ "build",
35
+ "force_recreate",
36
+ "no_build",
37
+ "no_recreate",
38
+ "remove_orphans",
39
+ ]
@@ -0,0 +1,29 @@
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
+
4
+ from typing import List, Optional
5
+
6
+ import attr
7
+
8
+ from docker_composer.base import DockerBaseRunner
9
+
10
+
11
+ @attr.s(auto_attribs=True)
12
+ class DockerComposeDown(DockerBaseRunner):
13
+ """
14
+ Usage: docker compose down [OPTIONS]
15
+ Stop and remove containers, networks
16
+ """
17
+
18
+ remove_orphans: Optional[bool] = None
19
+ """Remove containers for services not defined in the Compose file."""
20
+ rmi: Optional[str] = None
21
+ """Remove images used by services. "local" remove only images that don't have a custom tag ("local"|"all")"""
22
+ timeout: Optional[int] = None
23
+ """Specify a shutdown timeout in seconds (default 10)"""
24
+ volumes: Optional[list] = None
25
+ """Remove named volumes declared in the volumes section of the Compose file and anonymous volumes attached to containers."""
26
+ _cmd: str = "down"
27
+ _options: List[str] = [
28
+ "remove_orphans",
29
+ ]
@@ -1,5 +1,5 @@
1
- # DO NOT EDIT: Autogenerated by src/docker_composer/_utils/generate_class.py
2
- # for docker-compose version 1.25.0, build unknown
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
3
 
4
4
  from typing import List, Optional
5
5
 
@@ -11,10 +11,8 @@ from docker_composer.base import DockerBaseRunner
11
11
  @attr.s(auto_attribs=True)
12
12
  class DockerComposeEvents(DockerBaseRunner):
13
13
  """
14
+ Usage: docker compose events [OPTIONS] [SERVICE...]
14
15
  Receive real time events from containers.
15
-
16
- Usage: events [options] [SERVICE...]
17
-
18
16
  """
19
17
 
20
18
  json: Optional[bool] = None
@@ -1,5 +1,5 @@
1
- # DO NOT EDIT: Autogenerated by src/docker_composer/_utils/generate_class.py
2
- # for docker-compose version 1.25.0, build unknown
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
3
 
4
4
  from typing import List, Optional
5
5
 
@@ -11,31 +11,26 @@ from docker_composer.base import DockerBaseRunner
11
11
  @attr.s(auto_attribs=True)
12
12
  class DockerComposeExec(DockerBaseRunner):
13
13
  """
14
- Execute a command in a running container
15
-
16
- Usage: exec [options] [-e KEY=VAL...] SERVICE COMMAND [ARGS...]
17
-
14
+ Usage: docker compose exec [OPTIONS] SERVICE COMMAND [ARGS...]
15
+ Execute a command in a running container.
18
16
  """
19
17
 
20
18
  detach: Optional[bool] = None
21
19
  """Detached mode: Run command in the background."""
20
+ env: Optional[list] = None
21
+ """Set environment variables"""
22
+ index: Optional[int] = None
23
+ """index of the container if there are multiple instances of a service [default: 1]. (default 1)"""
24
+ no_TTY: Optional[bool] = None
25
+ """Disable pseudo-TTY allocation. By default docker compose exec allocates a TTY. (default true)"""
22
26
  privileged: Optional[bool] = None
23
27
  """Give extended privileges to the process."""
24
28
  user: Optional[str] = None
25
29
  """Run the command as this user."""
26
- T: Optional[bool] = None
27
- """Disable pseudo-tty allocation. By default `docker-compose exec`
28
- allocates a TTY."""
29
- index: Optional[int] = None
30
- """index of the container if there are multiple
31
- instances of a service [default: 1]"""
32
- env: Optional[dict] = None
33
- """not supported in API < 1.25)"""
34
30
  workdir: Optional[str] = None
35
31
  """Path to workdir directory for this command."""
36
32
  _cmd: str = "exec"
37
33
  _options: List[str] = [
38
34
  "detach",
39
35
  "privileged",
40
- "T",
41
36
  ]
@@ -0,0 +1,25 @@
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
+
4
+ from typing import List, Optional
5
+
6
+ import attr
7
+
8
+ from docker_composer.base import DockerBaseRunner
9
+
10
+
11
+ @attr.s(auto_attribs=True)
12
+ class DockerComposeImages(DockerBaseRunner):
13
+ """
14
+ Usage: docker compose images [OPTIONS] [SERVICE...]
15
+ List images used by the created containers
16
+ """
17
+
18
+ format: Optional[str] = None
19
+ """Format the output. Values: [table | json]. (default "table")"""
20
+ quiet: Optional[bool] = None
21
+ """Only display IDs"""
22
+ _cmd: str = "images"
23
+ _options: List[str] = [
24
+ "quiet",
25
+ ]
@@ -0,0 +1,25 @@
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
+
4
+ from typing import List, Optional
5
+
6
+ import attr
7
+
8
+ from docker_composer.base import DockerBaseRunner
9
+
10
+
11
+ @attr.s(auto_attribs=True)
12
+ class DockerComposeKill(DockerBaseRunner):
13
+ """
14
+ Usage: docker compose kill [OPTIONS] [SERVICE...]
15
+ Force stop service containers.
16
+ """
17
+
18
+ remove_orphans: Optional[bool] = None
19
+ """Remove containers for services not defined in the Compose file."""
20
+ signal: Optional[str] = None
21
+ """SIGNAL to send to the container. (default "SIGKILL")"""
22
+ _cmd: str = "kill"
23
+ _options: List[str] = [
24
+ "remove_orphans",
25
+ ]
@@ -0,0 +1,38 @@
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
+
4
+ from typing import List, Optional
5
+
6
+ import attr
7
+
8
+ from docker_composer.base import DockerBaseRunner
9
+
10
+
11
+ @attr.s(auto_attribs=True)
12
+ class DockerComposeLogs(DockerBaseRunner):
13
+ """
14
+ Usage: docker compose logs [OPTIONS] [SERVICE...]
15
+ View output from containers
16
+ """
17
+
18
+ follow: Optional[bool] = None
19
+ """Follow log output."""
20
+ no_color: Optional[bool] = None
21
+ """Produce monochrome output."""
22
+ no_log_prefix: Optional[bool] = None
23
+ """Don't print prefix in logs."""
24
+ since: Optional[str] = None
25
+ """Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)"""
26
+ tail: Optional[str] = None
27
+ """Number of lines to show from the end of the logs for each container. (default "all")"""
28
+ timestamps: Optional[bool] = None
29
+ """Show timestamps."""
30
+ until: Optional[str] = None
31
+ """Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)"""
32
+ _cmd: str = "logs"
33
+ _options: List[str] = [
34
+ "follow",
35
+ "no_color",
36
+ "no_log_prefix",
37
+ "timestamps",
38
+ ]
@@ -0,0 +1,30 @@
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
+
4
+ from typing import List, Optional
5
+
6
+ import attr
7
+
8
+ from docker_composer.base import DockerBaseRunner
9
+
10
+
11
+ @attr.s(auto_attribs=True)
12
+ class DockerComposeLs(DockerBaseRunner):
13
+ """
14
+ Usage: docker compose ls [OPTIONS]
15
+ List running compose projects
16
+ """
17
+
18
+ all: Optional[bool] = None
19
+ """Show all stopped Compose projects"""
20
+ filter: Optional[str] = None
21
+ """Filter output based on conditions provided."""
22
+ format: Optional[str] = None
23
+ """Format the output. Values: [table | json]. (default "table")"""
24
+ quiet: Optional[bool] = None
25
+ """Only display IDs."""
26
+ _cmd: str = "ls"
27
+ _options: List[str] = [
28
+ "all",
29
+ "quiet",
30
+ ]
@@ -1,5 +1,5 @@
1
- # DO NOT EDIT: Autogenerated by src/docker_composer/_utils/generate_class.py
2
- # for docker-compose version 1.25.0, build unknown
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
3
 
4
4
  from typing import List, Optional
5
5
 
@@ -11,10 +11,8 @@ from docker_composer.base import DockerBaseRunner
11
11
  @attr.s(auto_attribs=True)
12
12
  class DockerComposePause(DockerBaseRunner):
13
13
  """
14
- Pause services.
15
-
16
- Usage: pause [SERVICE...]
17
-
14
+ Usage: docker compose pause [SERVICE...]
15
+ Pause services
18
16
  """
19
17
 
20
18
  _cmd: str = "pause"
@@ -1,5 +1,5 @@
1
- # DO NOT EDIT: Autogenerated by src/docker_composer/_utils/generate_class.py
2
- # for docker-compose version 1.25.0, build unknown
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
3
 
4
4
  from typing import List, Optional
5
5
 
@@ -11,16 +11,13 @@ from docker_composer.base import DockerBaseRunner
11
11
  @attr.s(auto_attribs=True)
12
12
  class DockerComposePort(DockerBaseRunner):
13
13
  """
14
+ Usage: docker compose port [OPTIONS] SERVICE PRIVATE_PORT
14
15
  Print the public port for a port binding.
15
-
16
- Usage: port [options] SERVICE PRIVATE_PORT
17
-
18
16
  """
19
17
 
20
- protocol: Optional[str] = None
21
- """tcp or udp [default: tcp]"""
22
18
  index: Optional[int] = None
23
- """index of the container if there are multiple
24
- instances of a service [default: 1]"""
19
+ """index of the container if service has multiple replicas (default 1)"""
20
+ protocol: Optional[str] = None
21
+ """tcp or udp (default "tcp")"""
25
22
  _cmd: str = "port"
26
23
  _options: List[str] = []
@@ -0,0 +1,35 @@
1
+ # DO NOT EDIT: Autogenerated by /Users/micha/dev/external/docker-composer/src/docker_composer/_utils/generate_class.py
2
+ # for Docker Compose version v2.17.2
3
+
4
+ from typing import List, Optional
5
+
6
+ import attr
7
+
8
+ from docker_composer.base import DockerBaseRunner
9
+
10
+
11
+ @attr.s(auto_attribs=True)
12
+ class DockerComposePs(DockerBaseRunner):
13
+ """
14
+ Usage: docker compose ps [OPTIONS] [SERVICE...]
15
+ List containers
16
+ """
17
+
18
+ all: Optional[bool] = None
19
+ """Show all stopped containers (including those created by the run command)"""
20
+ filter: Optional[str] = None
21
+ """Filter services by a property (supported filters: status)."""
22
+ format: Optional[str] = None
23
+ """Format the output. Values: [table | json] (default "table")"""
24
+ quiet: Optional[bool] = None
25
+ """Only display IDs"""
26
+ services: Optional[bool] = None
27
+ """Display services"""
28
+ status: Optional[list] = None
29
+ """Filter services by status. Values: [paused | restarting | removing | running | dead | created | exited]"""
30
+ _cmd: str = "ps"
31
+ _options: List[str] = [
32
+ "all",
33
+ "quiet",
34
+ "services",
35
+ ]