From ba43210eb1fa19df3945583f1199eb77cecba47b Mon Sep 17 00:00:00 2001 From: shechenglong Date: Fri, 8 Nov 2024 08:58:35 +0000 Subject: [PATCH] Don't check source exists with CreateMountpoint Signed-off-by: shechenglong --- ...Don-t-check-source-exists-with-Creat.patch | 37 +++++++++++++++++++ moby.spec | 6 ++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0010-mounts-validate-Don-t-check-source-exists-with-Creat.patch diff --git a/0010-mounts-validate-Don-t-check-source-exists-with-Creat.patch b/0010-mounts-validate-Don-t-check-source-exists-with-Creat.patch new file mode 100644 index 0000000..e6ef5b5 --- /dev/null +++ b/0010-mounts-validate-Don-t-check-source-exists-with-Creat.patch @@ -0,0 +1,37 @@ +From a72294a6688d747dcfec8751c3e2616cad703a31 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= +Date: Mon, 19 Feb 2024 15:16:07 +0100 +Subject: [PATCH] mounts/validate: Don't check source exists with + CreateMountpoint +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Don't error out when mount source doesn't exist and mounts has +`CreateMountpoint` option enabled. + +Signed-off-by: Paweł Gronowski +(cherry picked from commit 05b883bdc836a2fd621452f58a2a2c02d253718c) +Signed-off-by: Paweł Gronowski +--- + volume/mounts/linux_parser.go | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/volume/mounts/linux_parser.go b/volume/mounts/linux_parser.go +index 1b64c23935..e7e8ad80f3 100644 +--- a/volume/mounts/linux_parser.go ++++ b/volume/mounts/linux_parser.go +@@ -85,7 +85,9 @@ func (p *linuxParser) validateMountConfigImpl(mnt *mount.Mount, validateBindSour + if err != nil { + return &errMountConfig{mnt, err} + } +- if !exists { ++ ++ createMountpoint := mnt.BindOptions != nil && mnt.BindOptions.CreateMountpoint ++ if !exists && !createMountpoint { + return &errMountConfig{mnt, errBindSourceDoesNotExist(mnt.Source)} + } + } +-- +2.33.0 + diff --git a/moby.spec b/moby.spec index 68572e3..e834e6b 100644 --- a/moby.spec +++ b/moby.spec @@ -7,7 +7,7 @@ Name: docker Version: 25.0.3 -Release: 17 +Release: 18 Summary: The open-source application container engine License: ASL 2.0 URL: https://www.docker.com @@ -29,6 +29,7 @@ Patch0006: 0006-tini.c-a-function-declaration-without-a-prototype-is.patch Patch0007: 0007-fix-libnetwork-osl-test-TestAddRemoveInterface.patch Patch0008: 0008-api-omit-missing-Created-field-from-ImageInspect-res.patch Patch0009: 0009-integration-Add-container-output-utility.patch +Patch0010: 0010-mounts-validate-Don-t-check-source-exists-with-Creat.patch Requires(meta): %{name}-engine = %{version}-%{release} Requires(meta): %{name}-client = %{version}-%{release} @@ -205,6 +206,9 @@ fi %systemd_postun_with_restart docker.service %changelog +* Fri Nov 08 2024 shechenglong - 25.0.3-18 +- DESC: Don't check source exists with CreateMountpoint + * Fri Nov 08 2024 shechenglong - 25.0.3-17 - DESC: move group creation into pre section rather than post section change requires into meta dependency for its actual use -- Gitee