mirror of https://github.com/docker/docker-py.git
Merge branch 'main' into fix/exec_run_detached_struct
This commit is contained in:
commit
e02904c964
|
@ -6,7 +6,7 @@ FROM python:${PYTHON_VERSION}
|
|||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
ARG VERSION
|
||||
ARG VERSION=0.0.0.dev0
|
||||
RUN --mount=type=cache,target=/cache/pip \
|
||||
PIP_CACHE_DIR=/cache/pip \
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION} \
|
||||
|
|
|
@ -13,7 +13,7 @@ RUN addgroup --gid $gid sphinx \
|
|||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
ARG VERSION
|
||||
ARG VERSION=0.0.0.dev0
|
||||
RUN --mount=type=cache,target=/cache/pip \
|
||||
PIP_CACHE_DIR=/cache/pip \
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION} \
|
||||
|
|
13
Makefile
13
Makefile
|
@ -1,5 +1,5 @@
|
|||
TEST_API_VERSION ?= 1.44
|
||||
TEST_ENGINE_VERSION ?= 25.0
|
||||
TEST_API_VERSION ?= 1.45
|
||||
TEST_ENGINE_VERSION ?= 26.1
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
PLATFORM := Windows
|
||||
|
@ -13,7 +13,7 @@ endif
|
|||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER ?= $(shell git describe --match '[0-9]*' --dirty='.m' --always --tags 2>/dev/null | sed -r 's/-([0-9]+)/.dev\1/' | sed 's/-/+/')
|
||||
ifeq ($(SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER),)
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER = "dev"
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER = "0.0.0.dev0"
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
|
@ -33,7 +33,7 @@ build-dind-ssh:
|
|||
--build-arg VERSION=${SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER} \
|
||||
--build-arg ENGINE_VERSION=${TEST_ENGINE_VERSION} \
|
||||
--build-arg API_VERSION=${TEST_API_VERSION} \
|
||||
--build-arg APT_MIRROR .
|
||||
.
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
|
@ -42,7 +42,7 @@ build:
|
|||
-t docker-sdk-python3 \
|
||||
-f tests/Dockerfile \
|
||||
--build-arg VERSION=${SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER} \
|
||||
--build-arg APT_MIRROR .
|
||||
.
|
||||
|
||||
.PHONY: build-docs
|
||||
build-docs:
|
||||
|
@ -76,9 +76,6 @@ integration-test: build
|
|||
setup-network:
|
||||
docker network inspect dpy-tests || docker network create dpy-tests
|
||||
|
||||
.PHONY: integration-dind
|
||||
integration-dind: integration-dind
|
||||
|
||||
.PHONY: integration-dind
|
||||
integration-dind: build setup-network
|
||||
docker rm -vf dpy-dind || :
|
||||
|
|
|
@ -2,7 +2,7 @@ import sys
|
|||
|
||||
from .version import __version__
|
||||
|
||||
DEFAULT_DOCKER_API_VERSION = '1.44'
|
||||
DEFAULT_DOCKER_API_VERSION = '1.45'
|
||||
MINIMUM_DOCKER_API_VERSION = '1.24'
|
||||
DEFAULT_TIMEOUT_SECONDS = 60
|
||||
STREAM_HEADER_SIZE_BYTES = 8
|
||||
|
|
|
@ -28,7 +28,7 @@ RUN curl -sSL -o /opt/docker-credential-pass.tar.gz \
|
|||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
ARG VERSION
|
||||
ARG VERSION=0.0.0.dev0
|
||||
RUN --mount=type=cache,target=/cache/pip \
|
||||
PIP_CACHE_DIR=/cache/pip \
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION} \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG API_VERSION=1.44
|
||||
ARG ENGINE_VERSION=25.0
|
||||
ARG API_VERSION=1.45
|
||||
ARG ENGINE_VERSION=26.1
|
||||
|
||||
FROM docker:${ENGINE_VERSION}-dind
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import pytest
|
|||
|
||||
import docker
|
||||
|
||||
from ..helpers import force_leave_swarm, requires_api_version, requires_experimental
|
||||
from ..helpers import force_leave_swarm, requires_api_version
|
||||
from .base import TEST_IMG, BaseAPIIntegrationTest
|
||||
|
||||
|
||||
|
@ -140,8 +140,7 @@ class ServiceTest(BaseAPIIntegrationTest):
|
|||
assert len(services) == 1
|
||||
assert services[0]['ID'] == svc_id['ID']
|
||||
|
||||
@requires_api_version('1.25')
|
||||
@requires_experimental(until='1.29')
|
||||
@requires_api_version('1.29')
|
||||
def test_service_logs(self):
|
||||
name, svc_id = self.create_simple_service()
|
||||
assert self.get_service_container(name, include_stopped=True)
|
||||
|
|
|
@ -131,10 +131,9 @@ class ContainerCollectionTest(BaseIntegrationTest):
|
|||
assert 'NetworkSettings' in attrs
|
||||
assert 'Networks' in attrs['NetworkSettings']
|
||||
assert list(attrs['NetworkSettings']['Networks'].keys()) == [net_name]
|
||||
# Expect Aliases to list 'test_alias' and the container's short-id.
|
||||
# In API version 1.45, the short-id will be removed.
|
||||
# Aliases no longer include the container's short-id in API v1.45.
|
||||
assert attrs['NetworkSettings']['Networks'][net_name]['Aliases'] \
|
||||
== [test_alias, attrs['Id'][:12]]
|
||||
== [test_alias]
|
||||
assert attrs['NetworkSettings']['Networks'][net_name]['DriverOpts'] \
|
||||
== test_driver_opt
|
||||
|
||||
|
@ -191,9 +190,9 @@ class ContainerCollectionTest(BaseIntegrationTest):
|
|||
assert 'NetworkSettings' in attrs
|
||||
assert 'Networks' in attrs['NetworkSettings']
|
||||
assert list(attrs['NetworkSettings']['Networks'].keys()) == [net_name]
|
||||
# Aliases should include the container's short-id (but it will be removed
|
||||
# in API v1.45).
|
||||
assert attrs['NetworkSettings']['Networks'][net_name]['Aliases'] == [attrs["Id"][:12]]
|
||||
# Aliases no longer include the container's short-id in API v1.45.
|
||||
assert (attrs['NetworkSettings']['Networks'][net_name]['Aliases']
|
||||
is None)
|
||||
assert (attrs['NetworkSettings']['Networks'][net_name]['DriverOpts']
|
||||
is None)
|
||||
|
||||
|
|
Loading…
Reference in New Issue