mirror of
https://github.com/containers/podman-compose.git
synced 2025-04-25 09:59:02 +02:00
calc proper hash
This commit is contained in:
parent
132a22b524
commit
1e895c0873
@ -1085,6 +1085,7 @@ class PodmanCompose:
|
|||||||
self.container_names_by_service = None
|
self.container_names_by_service = None
|
||||||
self.container_by_name = None
|
self.container_by_name = None
|
||||||
self._prefer_volume_over_mount = True
|
self._prefer_volume_over_mount = True
|
||||||
|
self.yaml_hash = ''
|
||||||
self.console_colors = ["\x1B[1;32m", "\x1B[1;33m", "\x1B[1;34m", "\x1B[1;35m", "\x1B[1;36m"]
|
self.console_colors = ["\x1B[1;32m", "\x1B[1;33m", "\x1B[1;34m", "\x1B[1;35m", "\x1B[1;36m"]
|
||||||
|
|
||||||
def get_podman_args(self, cmd):
|
def get_podman_args(self, cmd):
|
||||||
@ -1197,6 +1198,8 @@ class PodmanCompose:
|
|||||||
content = rec_subs(content, self.environ)
|
content = rec_subs(content, self.environ)
|
||||||
rec_merge(compose, content)
|
rec_merge(compose, content)
|
||||||
self.merged_yaml = yaml.safe_dump(compose)
|
self.merged_yaml = yaml.safe_dump(compose)
|
||||||
|
merged_json_b = json.dumps(compose, separators=(',',':')).encode('utf-8')
|
||||||
|
self.yaml_hash = hashlib.sha256(merged_json_b).hexdigest()
|
||||||
compose['_dirname'] = dirname
|
compose['_dirname'] = dirname
|
||||||
# debug mode
|
# debug mode
|
||||||
if len(files)>1:
|
if len(files)>1:
|
||||||
@ -1239,7 +1242,7 @@ class PodmanCompose:
|
|||||||
# volumes: [...]
|
# volumes: [...]
|
||||||
self.vols = compose.get('volumes', {})
|
self.vols = compose.get('volumes', {})
|
||||||
podman_compose_labels = [
|
podman_compose_labels = [
|
||||||
"io.podman.compose.config-hash=123",
|
"io.podman.compose.config-hash="+ self.yaml_hash,
|
||||||
"io.podman.compose.project=" + project_name,
|
"io.podman.compose.project=" + project_name,
|
||||||
"io.podman.compose.version=0.0.1",
|
"io.podman.compose.version=0.0.1",
|
||||||
"com.docker.compose.project=" + project_name,
|
"com.docker.compose.project=" + project_name,
|
||||||
|
@ -1 +1 @@
|
|||||||
FROM buysbox as base
|
FROM busybox as base
|
||||||
|
Loading…
Reference in New Issue
Block a user