Creates a new docker container using a loaded image
docker create -p {{PORT}}:{{PORT}} --env-file {{ENV_FILE}} --name {{CONTAINER_NAME}} {{IMAME_ID}}
- PORT: Port on which container needs to be run
- ENV_FILE: ENV file to set environment variables inside docker container
- CONTAINER_NAME: Name which will be assigned to the newly created container
docker create -p 8080:8080 --env-file ak-cli-prod.env --name ak-cli ak-cli-image
Note: --env-file
and --name
flags are optional