Skip to content

Commit 6649587

Browse files
authored
Merge pull request #2443 from docker/4.1.0-release
4.1.0 release
2 parents 1308cfb + 2bb08b3 commit 6649587

38 files changed

+453
-248
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM python:2.7
1+
ARG PYTHON_VERSION=2.7
2+
3+
FROM python:${PYTHON_VERSION}
24

35
RUN mkdir /src
46
WORKDIR /src

Dockerfile-docs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM python:3.5
1+
ARG PYTHON_VERSION=3.7
2+
3+
FROM python:${PYTHON_VERSION}
24

35
ARG uid=1000
46
ARG gid=1000

Dockerfile-py3

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM python:3.6
1+
ARG PYTHON_VERSION=3.7
2+
3+
FROM python:${PYTHON_VERSION}
24

35
RUN mkdir /src
46
WORKDIR /src

Jenkinsfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def buildImages = { ->
2525
imageNamePy3 = "${imageNameBase}:py3-${gitCommit()}"
2626

2727
buildImage(imageNamePy2, "-f tests/Dockerfile --build-arg PYTHON_VERSION=2.7 .", "py2.7")
28-
buildImage(imageNamePy3, "-f tests/Dockerfile --build-arg PYTHON_VERSION=3.6 .", "py3.6")
28+
buildImage(imageNamePy3, "-f tests/Dockerfile --build-arg PYTHON_VERSION=3.7 .", "py3.7")
2929
}
3030
}
3131
}
@@ -46,12 +46,14 @@ def getDockerVersions = { ->
4646

4747
def getAPIVersion = { engineVersion ->
4848
def versionMap = [
49-
'17.06': '1.30', '17.12': '1.35', '18.02': '1.36', '18.03': '1.37',
50-
'18.06': '1.38', '18.09': '1.39'
49+
'17.06': '1.30',
50+
'18.03': '1.37',
51+
'18.09': '1.39',
52+
'19.03': '1.40'
5153
]
5254
def result = versionMap[engineVersion.substring(0, 5)]
5355
if (!result) {
54-
return '1.39'
56+
return '1.40'
5557
}
5658
return result
5759
}

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ clean:
88

99
.PHONY: build
1010
build:
11-
docker build -t docker-sdk-python -f tests/Dockerfile --build-arg PYTHON_VERSION=2.7 .
11+
docker build -t docker-sdk-python -f tests/Dockerfile --build-arg PYTHON_VERSION=2.7 --build-arg APT_MIRROR .
1212

1313
.PHONY: build-py3
1414
build-py3:
15-
docker build -t docker-sdk-python3 -f tests/Dockerfile .
15+
docker build -t docker-sdk-python3 -f tests/Dockerfile --build-arg APT_MIRROR .
1616

1717
.PHONY: build-docs
1818
build-docs:

docker/api/build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ def _set_auth_headers(self, headers):
308308
auth_data = self._auth_configs.get_all_credentials()
309309

310310
# See https://github.com/docker/docker-py/issues/1683
311-
if auth.INDEX_URL not in auth_data and auth.INDEX_URL in auth_data:
311+
if (auth.INDEX_URL not in auth_data and
312+
auth.INDEX_NAME in auth_data):
312313
auth_data[auth.INDEX_URL] = auth_data.get(auth.INDEX_NAME, {})
313314

314315
log.debug(

docker/api/container.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ def containers(self, quiet=False, all=False, trunc=False, latest=False,
174174
- `exited` (int): Only containers with specified exit code
175175
- `status` (str): One of ``restarting``, ``running``,
176176
``paused``, ``exited``
177-
- `label` (str): format either ``"key"`` or ``"key=value"``
177+
- `label` (str|list): format either ``"key"``, ``"key=value"``
178+
or a list of such.
178179
- `id` (str): The id of the container.
179180
- `name` (str): The name of the container.
180181
- `ancestor` (str): Filter by container ancestor. Format of
@@ -502,6 +503,7 @@ def create_host_config(self, *args, **kwargs):
502503
bytes) or a string with a units identification char
503504
(``100000b``, ``1000k``, ``128m``, ``1g``). If a string is
504505
specified without a units character, bytes are assumed as an
506+
mem_reservation (int or str): Memory soft limit.
505507
mem_swappiness (int): Tune a container's memory swappiness
506508
behavior. Accepts number between 0 and 100.
507509
memswap_limit (str or int): Maximum amount of memory + swap a

docker/api/image.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ def images(self, name=None, quiet=False, all=False, filters=None):
7070
filters (dict): Filters to be processed on the image list.
7171
Available filters:
7272
- ``dangling`` (bool)
73-
- ``label`` (str): format either ``key`` or ``key=value``
73+
- `label` (str|list): format either ``"key"``, ``"key=value"``
74+
or a list of such.
7475
7576
Returns:
7677
(dict or list): A list if ``quiet=True``, otherwise a dict.

docker/api/network.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
class NetworkApiMixin(object):
88
def networks(self, names=None, ids=None, filters=None):
99
"""
10-
List networks. Similar to the ``docker networks ls`` command.
10+
List networks. Similar to the ``docker network ls`` command.
1111
1212
Args:
1313
names (:py:class:`list`): List of names to filter by
1414
ids (:py:class:`list`): List of ids to filter by
1515
filters (dict): Filters to be processed on the network list.
1616
Available filters:
1717
- ``driver=[<driver-name>]`` Matches a network's driver.
18-
- ``label=[<key>]`` or ``label=[<key>=<value>]``.
18+
- ``label=[<key>]``, ``label=[<key>=<value>]`` or a list of
19+
such.
1920
- ``type=["custom"|"builtin"]`` Filters networks by type.
2021
2122
Returns:

docker/api/service.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ def create_service(
135135
of the service. Default: ``None``
136136
rollback_config (RollbackConfig): Specification for the rollback
137137
strategy of the service. Default: ``None``
138-
networks (:py:class:`list`): List of network names or IDs to attach
139-
the service to. Default: ``None``.
138+
networks (:py:class:`list`): List of network names or IDs or
139+
:py:class:`~docker.types.NetworkAttachmentConfig` to attach the
140+
service to. Default: ``None``.
140141
endpoint_spec (EndpointSpec): Properties that can be configured to
141142
access and load balance a service. Default: ``None``.
142143
@@ -383,8 +384,9 @@ def update_service(self, service, version, task_template=None, name=None,
383384
of the service. Default: ``None``.
384385
rollback_config (RollbackConfig): Specification for the rollback
385386
strategy of the service. Default: ``None``
386-
networks (:py:class:`list`): List of network names or IDs to attach
387-
the service to. Default: ``None``.
387+
networks (:py:class:`list`): List of network names or IDs or
388+
:py:class:`~docker.types.NetworkAttachmentConfig` to attach the
389+
service to. Default: ``None``.
388390
endpoint_spec (EndpointSpec): Properties that can be configured to
389391
access and load balance a service. Default: ``None``.
390392
fetch_current_spec (boolean): Use the undefined settings from the

0 commit comments

Comments
 (0)