diff options
author | Brian Goff <cpuguy83@gmail.com> | 2023-02-24 16:27:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 16:27:11 +0000 |
commit | 0021339b9299c5f1596bdf772a42ce346f16f060 (patch) | |
tree | 6127e555d932f12bd49d0e87064c431c45c74a7c /api/server | |
parent | 2f0e308c7d4cb59f33664b763fa95542dee3c024 (diff) | |
parent | 0ffaa6c7858f0a5d85318efda43a2d20a684eae2 (diff) | |
download | docker-0021339b9299c5f1596bdf772a42ce346f16f060.tar.gz |
Merge pull request #45025 from corhere/oci-annotation-passthru
Diffstat (limited to 'api/server')
-rw-r--r-- | api/server/router/container/container_routes.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/api/server/router/container/container_routes.go b/api/server/router/container/container_routes.go index 827553d62e..9436ab46d8 100644 --- a/api/server/router/container/container_routes.go +++ b/api/server/router/container/container_routes.go @@ -563,6 +563,11 @@ func (s *containerRouter) postContainersCreate(ctx context.Context, w http.Respo hostConfig.ConsoleSize = [2]uint{0, 0} } + if hostConfig != nil && versions.LessThan(version, "1.43") { + // Ignore Annotations because it was added in API v1.43. + hostConfig.Annotations = nil + } + var platform *specs.Platform if versions.GreaterThanOrEqualTo(version, "1.41") { if v := r.Form.Get("platform"); v != "" { |