Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 674 Bytes

docker-run.md

File metadata and controls

27 lines (15 loc) · 674 Bytes

To Run an image

docker run -it {{IMAGE_ID}}

  • IMAGE_ID: Docker image ID

Flags

docker run -v {{INPUT_FILE}}:{{CONTAINER_FILE_LOCATION}} {{IMAGE_ID}}

  • -v: This flag takes a file input which will be added to the container

  • INPUT_FILE: File to add in the container

  • CONTAINER_FILE_LOCATION: Location where file will be stored in the container

  • IMAGE_ID: Docker image ID

Example

docker run -it hello-world

docker run -v ~/configuration.json:/root/configuration.json hello-world

Docker run

Related Commands