We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
docker.utils.decorators.check_resource problem
When use `docker_client.start(**kwargs)` to start the container, will be raise follow exception:

```
c.start(**s_kwargs)
  File "/home/simplecloud/shiyanlou/env/local/lib/python2.7/site-packages/docker/utils/decorators.py", line 12, in wrapped
    return f(self, resource_id, *args, **kwargs)
TypeError: start() got multiple values for keyword argument 'container'
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docker/utils/decorators.py`
Content:
```
1 from .. import errors
2 
3 
4 def check_resource(f):
5     def wrapped(self, resource_id=None, *args, **kwargs):
6         if resource_id is None and (
7             kwargs.get('container') is None and kwargs.get('image') is None
8         ):
9             raise errors.NullResource(
10                 'image or container param is None'
11             )
12         return f(self, resource_id, *args, **kwargs)
13     return wrapped
14
```

Path: `docker/version.py`
Content:
```
1 version = "1.2.1-dev"
2 version_info = tuple([int(d) for d in version.replace("-dev", "").split(".")])
3
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/docker/utils/decorators.py b/docker/utils/decorators.py
--- a/docker/utils/decorators.py
+++ b/docker/utils/decorators.py
@@ -3,11 +3,14 @@
 
 def check_resource(f):
     def wrapped(self, resource_id=None, *args, **kwargs):
-        if resource_id is None and (
-            kwargs.get('container') is None and kwargs.get('image') is None
-        ):
-            raise errors.NullResource(
-                'image or container param is None'
-            )
+        if resource_id is None:
+            if kwargs.get('container'):
+                resource_id = kwargs.pop('container')
+            elif kwargs.get('image'):
+                resource_id = kwargs.pop('image')
+            else:
+                raise errors.NullResource(
+                    'image or container param is undefined'
+                )
         return f(self, resource_id, *args, **kwargs)
     return wrapped
diff --git a/docker/version.py b/docker/version.py
--- a/docker/version.py
+++ b/docker/version.py
@@ -1,2 +1,2 @@
-version = "1.2.1-dev"
+version = "1.2.1"
 version_info = tuple([int(d) for d in version.replace("-dev", "").split(".")])

{"golden_diff": "diff --git a/docker/utils/decorators.py b/docker/utils/decorators.py\n--- a/docker/utils/decorators.py\n+++ b/docker/utils/decorators.py\n@@ -3,11 +3,14 @@\n \n def check_resource(f):\n     def wrapped(self, resource_id=None, *args, **kwargs):\n-        if resource_id is None and (\n-            kwargs.get('container') is None and kwargs.get('image') is None\n-        ):\n-            raise errors.NullResource(\n-                'image or container param is None'\n-            )\n+        if resource_id is None:\n+            if kwargs.get('container'):\n+                resource_id = kwargs.pop('container')\n+            elif kwargs.get('image'):\n+                resource_id = kwargs.pop('image')\n+            else:\n+                raise errors.NullResource(\n+                    'image or container param is undefined'\n+                )\n         return f(self, resource_id, *args, **kwargs)\n     return wrapped\ndiff --git a/docker/version.py b/docker/version.py\n--- a/docker/version.py\n+++ b/docker/version.py\n@@ -1,2 +1,2 @@\n-version = \"1.2.1-dev\"\n+version = \"1.2.1\"\n version_info = tuple([int(d) for d in version.replace(\"-dev\", \"\").split(\".\")])\n", "issue": "docker.utils.decorators.check_resource problem\nWhen use `docker_client.start(**kwargs)` to start the container, will be raise follow exception:\n\n```\nc.start(**s_kwargs)\n  File \"/home/simplecloud/shiyanlou/env/local/lib/python2.7/site-packages/docker/utils/decorators.py\", line 12, in wrapped\n    return f(self, resource_id, *args, **kwargs)\nTypeError: start() got multiple values for keyword argument 'container'\n```\n\n", "before_files": [{"content": "from .. import errors\n\n\ndef check_resource(f):\n    def wrapped(self, resource_id=None, *args, **kwargs):\n        if resource_id is None and (\n            kwargs.get('container') is None and kwargs.get('image') is None\n        ):\n            raise errors.NullResource(\n                'image or container param is None'\n            )\n        return f(self, resource_id, *args, **kwargs)\n    return wrapped\n", "path": "docker/utils/decorators.py"}, {"content": "version = \"1.2.1-dev\"\nversion_info = tuple([int(d) for d in version.replace(\"-dev\", \"\").split(\".\")])\n", "path": "docker/version.py"}], "after_files": [{"content": "from .. import errors\n\n\ndef check_resource(f):\n    def wrapped(self, resource_id=None, *args, **kwargs):\n        if resource_id is None:\n            if kwargs.get('container'):\n                resource_id = kwargs.pop('container')\n            elif kwargs.get('image'):\n                resource_id = kwargs.pop('image')\n            else:\n                raise errors.NullResource(\n                    'image or container param is undefined'\n                )\n        return f(self, resource_id, *args, **kwargs)\n    return wrapped\n", "path": "docker/utils/decorators.py"}, {"content": "version = \"1.2.1\"\nversion_info = tuple([int(d) for d in version.replace(\"-dev\", \"\").split(\".\")])\n", "path": "docker/version.py"}]}