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
76845602
Kaydet (Commit)
76845602
authored
May 09, 2019
tarafından
Batuhan Taşkaya
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Path-like support for dockerfile directory
Fixes #2336 Signed-off-by:
Batuhan Taşkaya
<
btaskaya33@gmail.com
>
üst
23c5c001
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
build.py
docker/api/build.py
+2
-0
api_build_test.py
tests/unit/api_build_test.py
+4
-0
No files found.
docker/api/build.py
Dosyayı görüntüle @
76845602
...
...
@@ -124,6 +124,8 @@ class BuildApiMixin(object):
buildargs
=
buildargs
or
{}
if
path
is
None
and
fileobj
is
None
:
raise
TypeError
(
"Either path or fileobj needs to be provided."
)
if
path
is
not
None
:
path
=
os
.
fspath
(
path
)
if
gzip
and
encoding
is
not
None
:
raise
errors
.
DockerException
(
'Can not use custom encoding if gzip is enabled'
...
...
tests/unit/api_build_test.py
Dosyayı görüntüle @
76845602
import
gzip
import
io
import
shutil
from
pathlib
import
Path
import
docker
from
docker
import
auth
...
...
@@ -99,6 +100,9 @@ class BuildTest(BaseAPIClientTest):
def
test_build_container_with_named_dockerfile
(
self
):
self
.
client
.
build
(
'.'
,
dockerfile
=
'nameddockerfile'
)
def
test_build_container_with_pathlike
(
self
):
self
.
client
.
build
(
Path
(
'.'
))
def
test_build_container_with_container_limits
(
self
):
self
.
client
.
build
(
'.'
,
container_limits
=
{
...
...
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