Create docker image using Dockerfile(Add required packages and softwares). Start container using docker-compose
.
- cd to the directory i.e
cd images/nginx
- Create a docker image by name
tutorial/nginx
using Dockerfiledocker build -t tutorial/nginx .
- Start the container using this image
docker-compose up -d
- Stop the container
docker-compose stop
- Create image from the Dockerfile
- Start container using
docker-compose
commands