- Run Docker Image:
docker run -it your-image-name
- Or, if you want to run a specific command within the image, like running a bash shell:
docker run -it your-image-name /bin/bash
- Create Docker Image:
docker build -t your-project-name .
The dot at the end indicates that the build should occur in the root directory. If you want to build from a different directory, use the../
syntax. - List Docker Images:
docker images
- Remove Docker Image:
docker image rm image-name
- Forcefully Remove Docker Image:
docker image rm image-name -f
- List Containers:
docker ps -a
- Remove Container:
docker container rm container_name