Skip to content

Commit 7841b4f

Browse files
committed
feat(compose): perform additional validation
Ensures that networks, volumes (when used across multiple services), configs, and secrets used in each service are defined in the appropriate top-level field. Signed-off-by: Paul Nettleton <[email protected]>
1 parent c24cd62 commit 7841b4f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/cli/compose.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ impl Compose {
9999
options.apply_merge(true);
100100
let compose = read_from_file_or_stdin(compose_file.as_deref(), &options)
101101
.wrap_err("error reading compose file")?;
102+
compose
103+
.validate_all()
104+
.wrap_err("error validating compose file")?;
102105

103106
if kube {
104107
let mut k8s_file = k8s::File::try_from(compose)

0 commit comments

Comments
 (0)