Quick Actions
docker run
Description
Run a command in a new container.
Command
docker run
Examples
Run container in background
docker run -d --name my-app nginx
Run with port mapping
docker run -d -p 8080:80 --name web nginx
Run with volume mount
docker run -d -v /host/path:/container/path --name app my-image
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
-d |
string | No | Run container in background (detached mode) |
-p |
string | No | Publish container port to host |
-v |
string | No | Bind mount a volume |
--name |
string | No | Assign a name to the container |
-e |
string | No | Set environment variables |
Command Info
Category:
Container Management
Type:
Docker
Views:
13
Status:
Active
Tags
container
run
start