Add image mount options by LaurentGoderre · Pull Request #5755 · docker/cli

@LaurentGoderre

- What I did

Add support for image mount options. Supports moby/moby#48798

- How I did it

- How to verify it

- Description for the changelog

Add `--mount type=image,image-subpath=[subpath],...` option to mount a specific path from the image.

- A picture of a cute animal (not mandatory but encouraged)

@codecov-commenter

Codecov Report

Attention: Patch coverage is 14.58333% with 41 lines in your changes missing coverage. Please review.

Project coverage is 59.18%. Comparing base (1e3e1bd) to head (04b1b4e).
Report is 8 commits behind head on master.

❌ Your patch status has failed because the patch coverage (14.58%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5755      +/-   ##
==========================================
- Coverage   59.25%   59.18%   -0.08%     
==========================================
  Files         352      352              
  Lines       29496    29544      +48     
==========================================
+ Hits        17479    17486       +7     
- Misses      11042    11078      +36     
- Partials      975      980       +5     

@LaurentGoderre

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>

vvoland

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

laurazard

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@apollo13

As a heads up, mounting with an image subpath doesn't survive a docker daemon restart currently (bug?): moby/moby#50999 -- crosslinking for visibility if others run into it.