Skip to content

Commit

Permalink
check: mount layer as read-only
Browse files Browse the repository at this point in the history
mount the image as read-only so it can work also for composefs images.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed Jul 3, 2024
1 parent 52b643e commit b90afbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b90afbd

Please sign in to comment.