Skip to content

Docker

Build, run, inspect, and manage Docker containers.

6 modules

ModuleDescription
Docker İmajı OluşturBir Dockerfile'dan Docker imajı oluştur
Docker Konteynerını İnceleBir Docker konteyneri hakkında detaylı bilgi al
Konteyner Loglarını AlDocker konteynerinden logları al
Docker Konteynerlerini ListeleDocker konteynerlerini listele
Docker Konteynerı ÇalıştırBir imajdan Docker konteynerı çalıştır
Docker Konteynerı DurdurÇalışan bir Docker konteynerını durdur

Modules

Docker İmajı Oluştur

docker.build

Bir Dockerfile'dan Docker imajı oluştur

Parameters:

NameTypeRequiredDefaultDescription
pathstringYes-Oluşturma bağlamı dizinine giden yol
tagstringYes-İmajın adı ve isteğe bağlı olarak etiketi (ör. myapp:latest)
dockerfilestringNo-Dockerfile'a giden yol (oluşturma bağlamına göre)
build_argsobjectNo-Oluşturma zamanı değişkenleri (ör. {"NODE_ENV": "production"})
no_cachebooleanNoFalseİmajı oluştururken önbellek kullanma

Output:

FieldTypeDescription
image_idstringOluşturulan imajın ID'si
tagstringİmaja uygulanan etiket
sizestringOluşturulan imajın boyutu

Example: Build from current directory

yaml
path: .
tag: myapp:latest

Example: Build with custom Dockerfile and args

yaml
path: ./backend
tag: myapi:v1.0
dockerfile: Dockerfile.prod
build_args: {"NODE_ENV": "production"}
no_cache: true

Docker Konteynerını İncele

docker.inspect_container

Bir Docker konteyneri hakkında detaylı bilgi al

Parameters:

NameTypeRequiredDefaultDescription
containerstringYes-İncelenecek konteyner ID'si veya adı

Output:

FieldTypeDescription
idstringKısa konteyner ID'si
namestringKonteyner adı
stateobjectKonteyner durumu (durum, çalışıyor, pid, çıkış kodu, vb.)
imagestringKonteynerin kullandığı imaj
network_settingsobjectAğ yapılandırması (IP, portlar, ağlar)
mountsarrayHacim ve bağlama noktaları
configobjectKonteyner yapılandırması (env, cmd, etiketler, vb.)

Example: Inspect a container by name

yaml
container: my-nginx

Example: Inspect a container by ID

yaml
container: a1b2c3d4e5f6

Konteyner Loglarını Al

docker.logs

Docker konteynerinden logları al

Parameters:

NameTypeRequiredDefaultDescription
containerstringYes-Konteyner ID veya adı
tailnumberNo100Logların sonundan gösterilecek satır sayısı
followbooleanNoFalseLog çıktısını takip et (zaman aşımına kadar akış)
timestampsbooleanNoFalseLog çıktısında zaman damgalarını göster

Output:

FieldTypeDescription
logsstringKonteyner log çıktısı
linesnumberDönen log satır sayısı

Example: Get last 50 lines

yaml
container: my-nginx
tail: 50

Example: Get logs with timestamps

yaml
container: my-app
tail: 100
timestamps: true

Docker Konteynerlerini Listele

docker.ps

Docker konteynerlerini listele

Parameters:

NameTypeRequiredDefaultDescription
allbooleanNoFalseTüm konteynerleri göster (varsayılan sadece çalışanları gösterir)
filtersobjectNo-Konteynerleri filtrele (örn. {"name": "my-app", "status": "running"})

Output:

FieldTypeDescription
containersarrayID, ad, imaj, durum, portlar ile konteyner listesi
countnumberBulunan konteyner sayısı

Example: List running containers

yaml

Example: List all containers

yaml
all: true

Example: Filter by name

yaml
filters: {"name": "nginx"}

Docker Konteynerı Çalıştır

docker.run

Bir imajdan Docker konteynerı çalıştır

Parameters:

NameTypeRequiredDefaultDescription
imagestringYes-Çalıştırılacak Docker imajı (ör. nginx:latest)
commandstringNo-Konteyner içinde çalıştırılacak komut
namestringNo-Konteynere bir ad ver
portsobjectNo-Port eşlemeleri host:konteyner olarak (ör. {"8080": "80"})
volumesobjectNo-Hacim eşlemeleri host_yolu:konteyner_yolu olarak
envobjectNo-Konteynerde ayarlanacak ortam değişkenleri
detachbooleanNoTrueKonteyneri arka planda çalıştır
removebooleanNoFalseKonteyner çıktığında otomatik olarak sil
networkstringNo-Konteyneri bir ağa bağla

Output:

FieldTypeDescription
container_idstringOluşturulan konteynerin ID'si
statusstringÇalıştırma sonrası konteyner durumu

Example: Run Nginx web server

yaml
image: nginx:latest
name: my-nginx
ports: {"8080": "80"}
detach: true

Example: Run a one-off command

yaml
image: alpine:latest
command: echo hello world
remove: true
detach: false

Docker Konteynerı Durdur

docker.stop

Çalışan bir Docker konteynerını durdur

Parameters:

NameTypeRequiredDefaultDescription
containerstringYes-Durdurulacak konteyner ID'si veya adı
timeoutnumberNo10Konteyneri öldürmeden önce bekleme süresi (saniye)

Output:

FieldTypeDescription
container_idstringDurdurulan konteynerin ID'si veya adı
stoppedbooleanKonteynerin başarıyla durdurulup durdurulmadığı

Example: Stop a container by name

yaml
container: my-nginx

Example: Stop with custom timeout

yaml
container: my-app
timeout: 30

Released under the Apache 2.0 License.