Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
docker-py
Commits
4c263ee2
Unverified
Kaydet (Commit)
4c263ee2
authored
Mar 05, 2018
tarafından
Joffrey F
Kaydeden (comit)
GitHub
Mar 05, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #1943 from docker/3.1.1-release
3.1.1 release
üst
79f27c68
52c3d528
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
8 deletions
+50
-8
build.py
docker/api/build.py
+2
-1
client.py
docker/api/client.py
+3
-1
version.py
docker/version.py
+1
-1
change-log.md
docs/change-log.md
+12
-0
api_build_test.py
tests/integration/api_build_test.py
+6
-1
base.py
tests/integration/base.py
+1
-1
models_containers_test.py
tests/integration/models_containers_test.py
+8
-2
fake_api.py
tests/unit/fake_api.py
+1
-1
utils_test.py
tests/unit/utils_test.py
+16
-0
No files found.
docker/api/build.py
Dosyayı görüntüle @
4c263ee2
...
...
@@ -143,7 +143,8 @@ class BuildApiMixin(object):
if
os
.
path
.
exists
(
dockerignore
):
with
open
(
dockerignore
,
'r'
)
as
f
:
exclude
=
list
(
filter
(
bool
,
[
l
.
strip
()
for
l
in
f
.
read
()
.
splitlines
()]
lambda
x
:
x
!=
''
and
x
[
0
]
!=
'#'
,
[
l
.
strip
()
for
l
in
f
.
read
()
.
splitlines
()]
))
context
=
utils
.
tar
(
path
,
exclude
=
exclude
,
dockerfile
=
dockerfile
,
gzip
=
gzip
...
...
docker/api/client.py
Dosyayı görüntüle @
4c263ee2
...
...
@@ -119,7 +119,9 @@ class APIClient(
)
self
.
mount
(
'http+docker://'
,
self
.
_custom_adapter
)
self
.
_unmount
(
'http://'
,
'https://'
)
self
.
base_url
=
'http+docker://localunixsocket'
# host part of URL should be unused, but is resolved by requests
# module in proxy_bypass_macosx_sysconf()
self
.
base_url
=
'http+docker://localhost'
elif
base_url
.
startswith
(
'npipe://'
):
if
not
IS_WINDOWS_PLATFORM
:
raise
DockerException
(
...
...
docker/version.py
Dosyayı görüntüle @
4c263ee2
version
=
"3.1.
0
"
version
=
"3.1.
1
"
version_info
=
tuple
([
int
(
d
)
for
d
in
version
.
split
(
"-"
)[
0
]
.
split
(
"."
)])
docs/change-log.md
Dosyayı görüntüle @
4c263ee2
Change log
==========
3.
1.1
-----
[
List of PRs / issues for this release
](
https://github.com/docker/docker-py/milestone/46?closed=1
)
### Bugfixes
*
Fixed a bug that caused costly DNS lookups on Mac OSX when connecting to the
engine through UNIX socket
*
Fixed a bug that caused
`.dockerignore`
comments to be read as exclusion
patterns
3.
1.0
-----
...
...
tests/integration/api_build_test.py
Dosyayı görüntüle @
4c263ee2
...
...
@@ -61,12 +61,16 @@ class BuildTest(BaseAPIIntegrationTest):
'Dockerfile'
,
'.dockerignore'
,
'!ignored/subdir/excepted-file'
,
''
,
# empty line
''
,
# empty line,
'#*'
,
# comment line
]))
with
open
(
os
.
path
.
join
(
base_dir
,
'not-ignored'
),
'w'
)
as
f
:
f
.
write
(
"this file should not be ignored"
)
with
open
(
os
.
path
.
join
(
base_dir
,
'#file.txt'
),
'w'
)
as
f
:
f
.
write
(
'this file should not be ignored'
)
subdir
=
os
.
path
.
join
(
base_dir
,
'ignored'
,
'subdir'
)
os
.
makedirs
(
subdir
)
with
open
(
os
.
path
.
join
(
subdir
,
'file'
),
'w'
)
as
f
:
...
...
@@ -92,6 +96,7 @@ class BuildTest(BaseAPIIntegrationTest):
logs
=
logs
.
decode
(
'utf-8'
)
assert
sorted
(
list
(
filter
(
None
,
logs
.
split
(
'
\n
'
))))
==
sorted
([
'/test/#file.txt'
,
'/test/ignored/subdir/excepted-file'
,
'/test/not-ignored'
])
...
...
tests/integration/base.py
Dosyayı görüntüle @
4c263ee2
...
...
@@ -36,7 +36,7 @@ class BaseIntegrationTest(unittest.TestCase):
pass
for
container
in
self
.
tmp_containers
:
try
:
client
.
api
.
remove_container
(
container
,
force
=
True
)
client
.
api
.
remove_container
(
container
,
force
=
True
,
v
=
True
)
except
docker
.
errors
.
APIError
:
pass
for
network
in
self
.
tmp_networks
:
...
...
tests/integration/models_containers_test.py
Dosyayı görüntüle @
4c263ee2
...
...
@@ -47,10 +47,13 @@ class ContainerCollectionTest(BaseIntegrationTest):
self
.
tmp_containers
.
append
(
container
.
id
)
container
.
wait
()
name
=
"container_volume_test"
out
=
client
.
containers
.
run
(
"alpine"
,
"cat /insidecontainer/test"
,
volumes
=
[
"
%
s:/insidecontainer"
%
path
]
volumes
=
[
"
%
s:/insidecontainer"
%
path
],
name
=
name
)
self
.
tmp_containers
.
append
(
name
)
assert
out
==
b
'hello
\n
'
def
test_run_with_named_volume
(
self
):
...
...
@@ -66,10 +69,13 @@ class ContainerCollectionTest(BaseIntegrationTest):
self
.
tmp_containers
.
append
(
container
.
id
)
container
.
wait
()
name
=
"container_volume_test"
out
=
client
.
containers
.
run
(
"alpine"
,
"cat /insidecontainer/test"
,
volumes
=
[
"somevolume:/insidecontainer"
]
volumes
=
[
"somevolume:/insidecontainer"
],
name
=
name
)
self
.
tmp_containers
.
append
(
name
)
assert
out
==
b
'hello
\n
'
def
test_run_with_network
(
self
):
...
...
tests/unit/fake_api.py
Dosyayı görüntüle @
4c263ee2
...
...
@@ -512,7 +512,7 @@ def post_fake_network_disconnect():
# Maps real api url to fake response callback
prefix
=
'http+docker://local
unixsocke
t'
prefix
=
'http+docker://local
hos
t'
if
constants
.
IS_WINDOWS_PLATFORM
:
prefix
=
'http+docker://localnpipe'
...
...
tests/unit/utils_test.py
Dosyayı görüntüle @
4c263ee2
...
...
@@ -902,6 +902,22 @@ class ExcludePathsTest(unittest.TestCase):
[
'*.md'
,
'!README*.md'
,
'README-secret.md'
]
)
==
set
([
'README.md'
,
'README-bis.md'
])
def
test_parent_directory
(
self
):
base
=
make_tree
(
[],
[
'a.py'
,
'b.py'
,
'c.py'
])
# Dockerignore reference stipulates that absolute paths are
# equivalent to relative paths, hence /../foo should be
# equivalent to ../foo. It also stipulates that paths are run
# through Go's filepath.Clean, which explicitely "replace
# "/.." by "/" at the beginning of a path".
assert
exclude_paths
(
base
,
[
'../a.py'
,
'/../b.py'
]
)
==
set
([
'c.py'
])
class
TarTest
(
unittest
.
TestCase
):
def
test_tar_with_excludes
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment