Container platform for developing, shipping, and running applications in isolated environments.
docker {config} {context} {debug} {host} {log-level} 📎 config 📎 context 📎 debug 🌍 host → ip 📎 log-level docker {config} {context} {debug} {host} {log-level} Sandbox: docker · Timeout: 300s
container.runtime.execute container.image.build container.image.publish container.orchestration.compose container.storage.volume container.network.manage | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
config | string | No | - | Location of client config files (default | --config |
context | string | No | - | Name of the context to use to connect to the | -c, --context |
debug | string | No | - | Enable debug mode | -D, --debug |
host | string | No | - | Daemon socket to connect to | -H, --host |
log-level | string | No | - | Set the logging level ("debug", "info" | -l, --log-level |
tls | string | No | - | Use TLS; implied by --tlsverify | --tls |
tlscacert | string | No | - | Trust certs signed only by this CA (default | --tlscacert |
tlscert | file | No | - | Path to TLS certificate file (default | --tlscert |
tlskey | file | No | - | Path to TLS key file (default | --tlskey |
tlsverify | string | No | - | Use TLS and verify the remote | --tlsverify |
version | string | No | - | Print version information and quit | -v, --version |
| Type | Description | MIME | Schema | Trust |
|---|---|---|---|---|
container.image.oci | Built or pulled OCI container image | application/vnd.oci.image.manifest.v1+json | 1.0.0 | verified |
container.runtime.logs | Log output from container execution | text/plain | - | verified |
Inputs
container.image.dockerfile Dockerfile for image build
container.image.oci Base container image
Outputs
container.image.oci Built or pulled container image
container.runtime.logs Container execution logs
network_trafficfilesystem_writeprocess_spawn Produces
container.image.ocicontainer.runtime.logsConsumes
container.image.dockerfilecontainer.image.oci| Resource | Value |
|---|---|
| CPU | high |
| Memory | 1024 MB |
| Network | high |
| Disk I/O | high |
Run an interactive container
docker run -it --rm ubuntu:latest bash Build an image from Dockerfile
docker build -t myapp:latest . Run a web server with port mapping
docker run -d -p 80:80 --name web nginx:alpine Execute command in running container
docker exec -it mycontainer ps aux Darkiros UTILS: Remove docker image
docker image rm [image_id] Darkiros UTILS: Delete an image from the local image store
docker rmi [image_id] Darkiros UTILS: List all images that are locally stored with the Docker Engine
docker images Darkiros UTILS: List all containers that are locally stored with the Docker Engine
docker ps -a Darkiros UTILS: List all containers that are currently running
docker ps -q Darkiros UTILS: Stop a running container
docker stop [container_id] Darkiros UTILS: Stop all running containers
docker stop $(docker ps -a -q) Darkiros UTILS: Build an image from the Dockerfile in the current directory and tag the image
docker build -t [image_name] . Darkiros UTILS: Pull an image from a registry
docker pull [image_name]:[tag] Darkiros UTILS: Create a new bash process inside the container and connect it to the terminal
docker exec -it [container_id] bash Darkiros UTILS: Print the last lines of a container’s logs
docker logs --tail 100 [container_id] | less Darkiros UTILS: Print the last lines of a container’s logs and follow
docker logs -f --tail 100 [container_id] Darkiros UTILS: Create new network
docker network create [network_name] Darkiros UTILS: List all networks
docker network ls Darkiros UTILS: Builds, (re)creates, starts, and attaches to containers for all services
docker-compose up Darkiros UTILS: Builds, (re)creates, starts, and dettaches to containers for all services
docker-compose up -d Darkiros UTILS: Stops containers and removes containers, networks, volumes, and images created by up
docker-compose down Docker is the industry-standard container platform that enables developers to package applications and their dependencies into lightweight, portable containers that run consistently across any environment.
Docker uses a client-server architecture:
dockerd): Background service managing containers, images, networks, and volumesdocker): Command-line interface that communicates with the daemon via REST APIflowchart LR
A[Dockerfile] -->|docker build| B[Image]
B -->|docker push| C[Registry]
C -->|docker pull| B
B -->|docker run| D[Container]
D -->|docker stop| E[Stopped]
E -->|docker start| D
E -->|docker rm| F[Removed]
For multi-container applications, docker compose defines services, networks, and volumes in a YAML file:
# docker-compose.yml
version: "3.9"
services:
web:
image: nginx:alpine
ports:
- "80:80"
database:
image: postgres:15
environment:
POSTGRES_DB: myapp
POSTGRES_PASSWORD: secret
volumes:
- db-data:/var/lib/postgresql/data
volumes:
db-data:
# Start all services
docker compose up -d
# View logs
docker compose logs -f
# Tear down
docker compose down -v
--privileged in production--read-only)--cap-drop ALL)docker scan or Trivy)