- Create app directory
- Update or Copy paste all your files (Flask App, Trained Model, config files)
- Create requirements.txt with all your dependencies
- Create Docker file
Clone the repository
docker build -t diabetes_prediction_app:0.0.1 .docker run -p 5000:5000 diabetes_prediction_app:0.0.1# To see all the images present in your machine
docker images# To see all the running containers in your machine
docker ps -a# To stop a running container
docker stop <container_id># To remove/delete a docker container(only if it stopped).
docker rm <container_id># To see the list of all the available images with their tag, image id, creation time and size.
docker image ls# To delete a specific image
docker rmi <image_id># To delete a docker image forcefully
docker rmi -f <image_id># To delete all the docker container available in your machine
docker rm -f (docker ps -a | awk '{print$1}')# To delete a specific image
docker image rm <image_name># Tag/rename your image with your username delete a specific image
docker tag diabetes_prediction_app:0.0.1 <account_namespace_in_DockerHub>/diabetes_prediction_app:0.0.1# Push the specific image
docker push <account_namespace_in_DockerHub>/diabetes_prediction_app:0.0.1# Pull a specific image
docker pull <account_namespace_in_DockerHub>/diabetes_prediction_app:0.0.1# Save specific image to tar file
docker save -o image.tar <image_name>:<tag># Load specific image from tar file
docker load -i image.tar <image_name>:<tag>