Skip to content

Commit e900172

Browse files
committed
resent count for multi layer builds
1 parent c30a1e7 commit e900172

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/dockerfile.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,9 @@ let layers (t : t) : int =
581581
| `From _ | `Run _ | `Copy _ | `Add _ -> true
582582
| _ -> false
583583
in
584-
List.fold_left (fun acc l -> if is_layer l then acc + 1 else acc) 0 t
584+
List.fold_left
585+
(fun acc l ->
586+
match l with `From _ -> 1 | _ -> if is_layer l then acc + 1 else acc)
587+
0 t
585588

586589
let pp ppf tl = Fmt.pf ppf "%s" (string_of_t tl)

0 commit comments

Comments
 (0)