From b90afbd788a7ca4c7ca69acf2089199545dd1bbe Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 3 Jul 2024 11:12:19 +0200 Subject: [PATCH] check: mount layer as read-only mount the image as read-only so it can work also for composefs images. Signed-off-by: Giuseppe Scrivano --- check.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check.go b/check.go index e58084fc7c..cf067468b4 100644 --- a/check.go +++ b/check.go @@ -366,7 +366,7 @@ func (s *store) Check(options *CheckOptions) (CheckReport, error) { if options.LayerMountable { func() { // Mount the layer. - mountPoint, err := s.graphDriver.Get(id, drivers.MountOpts{MountLabel: layer.MountLabel}) + mountPoint, err := s.graphDriver.Get(id, drivers.MountOpts{MountLabel: layer.MountLabel, Options: []string{"ro"}}) if err != nil { err := fmt.Errorf("%slayer %s: %w", readWriteDesc, id, err) if isReadWrite {