compose2pod 0.4.1__tar.gz → 0.4.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.
- {compose2pod-0.4.1 → compose2pod-0.4.2}/PKG-INFO +1 -1
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/emit.py +12 -2
- {compose2pod-0.4.1 → compose2pod-0.4.2}/pyproject.toml +1 -1
- {compose2pod-0.4.1 → compose2pod-0.4.2}/README.md +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/__init__.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/__main__.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/cli.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/exceptions.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/extends.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/graph.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/healthcheck.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/keys.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/parsing.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/pod.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/py.typed +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/read.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/resources.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/shell.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/stores.py +0 -0
- {compose2pod-0.4.1 → compose2pod-0.4.2}/compose2pod/values.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: compose2pod
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Convert a Docker Compose file into a script that runs its services as a single Podman pod
|
|
5
5
|
Keywords: podman,docker-compose,compose,pod,ci,testing,containers
|
|
6
6
|
Author: Artur Shiriev
|
|
@@ -335,7 +335,13 @@ def _plan(compose: dict[str, Any], options: EmitOptions) -> PlannedScript:
|
|
|
335
335
|
# Only the closure joins the pod, so only the closure is resolvable. A name
|
|
336
336
|
# pointing at 127.0.0.1 for a service that never runs would turn an honest
|
|
337
337
|
# resolution failure into a connection-refused.
|
|
338
|
-
|
|
338
|
+
# The pod name is added as a resolvable name so every container's own
|
|
339
|
+
# hostname (set to the pod name below) resolves. A pod shares one UTS
|
|
340
|
+
# namespace, so without this the hostname is the random container ID,
|
|
341
|
+
# absent from the owned /etc/hosts -- `hostname -f` then fails and images
|
|
342
|
+
# that resolve their own hostname at startup crash. Podman used to add this
|
|
343
|
+
# line itself; `--no-hosts` stops it, so the script owns it too.
|
|
344
|
+
hosts = [*hostnames({name: services[name] for name in order}), options.pod]
|
|
339
345
|
host_tokens = hosts_file_tokens(services, order, hosts)
|
|
340
346
|
completion_gated = {
|
|
341
347
|
dep
|
|
@@ -355,7 +361,11 @@ def _plan(compose: dict[str, Any], options: EmitOptions) -> PlannedScript:
|
|
|
355
361
|
lines.append(f"trap '{teardown}' EXIT")
|
|
356
362
|
pod_flags = pod_create_flags(services, order)
|
|
357
363
|
_collect_vars(pod_flags, names)
|
|
358
|
-
|
|
364
|
+
# `--uts private` gives the pod its own UTS namespace so `--hostname` is
|
|
365
|
+
# settable (in the host UTS namespace Podman refuses it); the pod name is
|
|
366
|
+
# the shared hostname, resolvable via the line added to the hosts file above.
|
|
367
|
+
pod_name = shlex.quote(options.pod)
|
|
368
|
+
pod_create = f"podman pod create --name {pod_name} --no-hosts --uts private --hostname {pod_name}"
|
|
359
369
|
if pod_flags:
|
|
360
370
|
pod_create += " " + _render(pod_flags)
|
|
361
371
|
lines.append(pod_create)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|