docker-stack 2.1.1__tar.gz → 2.2.0__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 (33) hide show
  1. {docker_stack-2.1.1 → docker_stack-2.2.0}/PKG-INFO +45 -3
  2. {docker_stack-2.1.1 → docker_stack-2.2.0}/README.md +44 -2
  3. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/cli.py +456 -46
  4. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/login.py +25 -5
  5. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/manager_api.py +41 -3
  6. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/shell_auth.py +37 -7
  7. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack.egg-info/PKG-INFO +45 -3
  8. {docker_stack-2.1.1 → docker_stack-2.2.0}/setup.py +1 -1
  9. {docker_stack-2.1.1 → docker_stack-2.2.0}/tests/test_docker_stack.py +283 -4
  10. {docker_stack-2.1.1 → docker_stack-2.2.0}/tests/test_login.py +47 -0
  11. {docker_stack-2.1.1 → docker_stack-2.2.0}/tests/test_manager_api.py +7 -2
  12. {docker_stack-2.1.1 → docker_stack-2.2.0}/tests/test_shell_auth.py +55 -2
  13. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/__init__.py +0 -0
  14. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/command_runner.py +0 -0
  15. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/compose.py +0 -0
  16. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/docker_objects.py +0 -0
  17. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/envsubst.py +0 -0
  18. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/envsubst_merge.py +0 -0
  19. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/helpers.py +0 -0
  20. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/markers.py +0 -0
  21. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/merge_conf.py +0 -0
  22. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/registry.py +0 -0
  23. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack/url_parser.py +0 -0
  24. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack.egg-info/SOURCES.txt +0 -0
  25. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack.egg-info/dependency_links.txt +0 -0
  26. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack.egg-info/entry_points.txt +0 -0
  27. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack.egg-info/requires.txt +0 -0
  28. {docker_stack-2.1.1 → docker_stack-2.2.0}/docker_stack.egg-info/top_level.txt +0 -0
  29. {docker_stack-2.1.1 → docker_stack-2.2.0}/pyproject.toml +0 -0
  30. {docker_stack-2.1.1 → docker_stack-2.2.0}/setup.cfg +0 -0
  31. {docker_stack-2.1.1 → docker_stack-2.2.0}/tests/test_docker_objects.py +0 -0
  32. {docker_stack-2.1.1 → docker_stack-2.2.0}/tests/test_load_env.py +0 -0
  33. {docker_stack-2.1.1 → docker_stack-2.2.0}/tests/test_node_ls.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docker-stack
3
- Version: 2.1.1
3
+ Version: 2.2.0
4
4
  Summary: CLI for deploying and managing Docker stacks.
5
5
  Home-page: https://github.com/mesudip/docker-stack
6
6
  Author: Sudip Bhattarai
@@ -47,6 +47,8 @@ Typical daemon-only workflow:
47
47
  ```bash
48
48
  docker-stack deploy my-stack docker-compose.yml
49
49
  docker-stack ls
50
+ docker-stack ls -n team-a
51
+ docker-stack ls -A
50
52
  docker-stack versions my-stack
51
53
  docker-stack cat my-stack
52
54
  docker-stack checkout my-stack v2
@@ -82,7 +84,10 @@ Use this option when CI can connect directly to the target Docker daemon.
82
84
 
83
85
  #### 2. Docker-Manager
84
86
 
85
- Use the bundled action when deploying through Docker-Manager:
87
+ Use the bundled action when deploying through
88
+ [Docker-Manager](https://github.com/mesudip/docker-enterprise). The manager
89
+ repository contains the server source, installation instructions, and deployment
90
+ documentation.
86
91
 
87
92
  For a full compose deployment directly from CI, use the action to configure
88
93
  Docker-Manager authentication and then run the normal `docker-stack deploy`
@@ -152,11 +157,48 @@ Open an isolated Bash or Zsh session for a manager context:
152
157
  docker-stack shell office
153
158
  ```
154
159
 
155
- The prompt displays `(docker:office)`, keeps the selected manager context active,
160
+ If `office` does not exist yet, the CLI asks for its Docker-Manager URL, creates
161
+ the context, authenticates, and opens the shell. You can also provide everything
162
+ non-interactively with `docker-stack shell --context office <manager-url>`.
163
+
164
+ Stack commands use the `default` namespace unless `-n/--namespace` is supplied.
165
+ Listings print the selected namespace; `docker-stack ls -A` (or
166
+ `--all-namespaces`) lists every visible namespace.
167
+
168
+ The prompt displays `(docker:office@cluster)`, keeps the selected manager context active,
156
169
  and refreshes authentication when needed. The session supports `docker` and
157
170
  `docker compose`; legacy `docker-compose` is not supported. If authentication
158
171
  expires, run `docker-stack login` again.
159
172
 
173
+ Container listing is cluster-aware and includes the owning Swarm node. Select a
174
+ node when working with daemon-local resources such as volumes and images:
175
+
176
+ ```bash
177
+ docker ps
178
+ docker-stack node current
179
+ docker-stack node use worker-02
180
+ docker volume ls
181
+ docker image ls
182
+ docker-stack node use cluster
183
+ ```
184
+
185
+ Node selection is stored only in the managed shell's isolated Docker
186
+ configuration and appears in the prompt as `(docker:office@worker-02)`.
187
+ Selected-node requests remain subject to the manager's Docker permissions;
188
+ image management is root-only because the manager does not define delegated
189
+ image permissions.
190
+
191
+ Cluster-aware output is enabled after the manager has observed compatible
192
+ agents on every discovered node. The manager remembers that capability until it
193
+ restarts, so a temporary agent outage does not make the CLI revert to a legacy
194
+ feature decision. A partial cluster listing prints the available containers,
195
+ reports each failed node on stderr with its incident id, and exits non-zero.
196
+
197
+ `docker ps --quiet` and `docker ps --format ...` use Docker's native formatter
198
+ and therefore do not add the `NODE` column. Explicit Docker overrides such as
199
+ `--context`, `--host`/`-H`, and `--config` bypass managed cluster formatting and
200
+ are sent unchanged to the Docker CLI.
201
+
160
202
  ## Core Capabilities
161
203
 
162
204
  - **Advanced Deployments on Plain Docker Daemons:**
@@ -21,6 +21,8 @@ Typical daemon-only workflow:
21
21
  ```bash
22
22
  docker-stack deploy my-stack docker-compose.yml
23
23
  docker-stack ls
24
+ docker-stack ls -n team-a
25
+ docker-stack ls -A
24
26
  docker-stack versions my-stack
25
27
  docker-stack cat my-stack
26
28
  docker-stack checkout my-stack v2
@@ -56,7 +58,10 @@ Use this option when CI can connect directly to the target Docker daemon.
56
58
 
57
59
  #### 2. Docker-Manager
58
60
 
59
- Use the bundled action when deploying through Docker-Manager:
61
+ Use the bundled action when deploying through
62
+ [Docker-Manager](https://github.com/mesudip/docker-enterprise). The manager
63
+ repository contains the server source, installation instructions, and deployment
64
+ documentation.
60
65
 
61
66
  For a full compose deployment directly from CI, use the action to configure
62
67
  Docker-Manager authentication and then run the normal `docker-stack deploy`
@@ -126,11 +131,48 @@ Open an isolated Bash or Zsh session for a manager context:
126
131
  docker-stack shell office
127
132
  ```
128
133
 
129
- The prompt displays `(docker:office)`, keeps the selected manager context active,
134
+ If `office` does not exist yet, the CLI asks for its Docker-Manager URL, creates
135
+ the context, authenticates, and opens the shell. You can also provide everything
136
+ non-interactively with `docker-stack shell --context office <manager-url>`.
137
+
138
+ Stack commands use the `default` namespace unless `-n/--namespace` is supplied.
139
+ Listings print the selected namespace; `docker-stack ls -A` (or
140
+ `--all-namespaces`) lists every visible namespace.
141
+
142
+ The prompt displays `(docker:office@cluster)`, keeps the selected manager context active,
130
143
  and refreshes authentication when needed. The session supports `docker` and
131
144
  `docker compose`; legacy `docker-compose` is not supported. If authentication
132
145
  expires, run `docker-stack login` again.
133
146
 
147
+ Container listing is cluster-aware and includes the owning Swarm node. Select a
148
+ node when working with daemon-local resources such as volumes and images:
149
+
150
+ ```bash
151
+ docker ps
152
+ docker-stack node current
153
+ docker-stack node use worker-02
154
+ docker volume ls
155
+ docker image ls
156
+ docker-stack node use cluster
157
+ ```
158
+
159
+ Node selection is stored only in the managed shell's isolated Docker
160
+ configuration and appears in the prompt as `(docker:office@worker-02)`.
161
+ Selected-node requests remain subject to the manager's Docker permissions;
162
+ image management is root-only because the manager does not define delegated
163
+ image permissions.
164
+
165
+ Cluster-aware output is enabled after the manager has observed compatible
166
+ agents on every discovered node. The manager remembers that capability until it
167
+ restarts, so a temporary agent outage does not make the CLI revert to a legacy
168
+ feature decision. A partial cluster listing prints the available containers,
169
+ reports each failed node on stderr with its incident id, and exits non-zero.
170
+
171
+ `docker ps --quiet` and `docker ps --format ...` use Docker's native formatter
172
+ and therefore do not add the `NODE` column. Explicit Docker overrides such as
173
+ `--context`, `--host`/`-H`, and `--config` bypass managed cluster formatting and
174
+ are sent unchanged to the Docker CLI.
175
+
134
176
  ## Core Capabilities
135
177
 
136
178
  - **Advanced Deployments on Plain Docker Daemons:**