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
a0545092
Kaydet (Commit)
a0545092
authored
Mar 16, 2016
tarafından
Aanand Prasad
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reword tmpfs documentation
Signed-off-by:
Aanand Prasad
<
aanand.prasad@gmail.com
>
üst
07455a6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
tmpfs.md
docs/tmpfs.md
+13
-12
No files found.
docs/tmpfs.md
Dosyayı görüntüle @
a0545092
# Using
T
mpfs
# Using
t
mpfs
Tmpfs declaration is done with the
`Client().create_container()`
method by declaring the mountpoints in the
`host_config`
section.
When creating a container, you can specify paths to be mounted with tmpfs using
the
`tmpfs`
argument to
`create_host_config`
, similarly to the
`--tmpfs`
argument to
`docker run`
.
This
is available from docker 1.10
.
This
capability is supported in Docker Engine 1.10 and up
.
You can provide a list of declarations similar to the
`--tmpfs`
option of the docker commandline clie
nt:
`tmpfs`
can be either a list or a dictionary. If it's a list, each item is a
string specifying the path and (optionally) any configuration for the mou
nt:
```
python
c
ontainer_id
=
cli
.
create_container
(
c
lient
.
create_container
(
'busybox'
,
'ls'
,
host_config
=
cli
.
create_host_config
(
tmpfs
=
[
host_config
=
cli
ent
.
create_host_config
(
tmpfs
=
[
'/mnt/vol2'
,
'/mnt/vol1:size=3G,uid=1000'
])
)
```
You can alternatively specify tmpfs as a dict the docker remote
API use
s:
Alternatively, if it's a dictionary, each key is a path and each value contains
the mount option
s:
```
python
c
ontainer_id
=
cli
.
create_container
(
c
lient
.
create_container
(
'busybox'
,
'ls'
,
host_config
=
cli
.
create_host_config
(
tmpfs
=
{
host_config
=
cli
ent
.
create_host_config
(
tmpfs
=
{
'/mnt/vol2'
:
''
,
'/mnt/vol1'
:
'size=3G,uid=1000'
})
...
...
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