https://github.com/codeofrahul/docker-mlops
This repo is to implement docker with the help of a project demo.
https://github.com/codeofrahul/docker-mlops
dagshub docker docker-container docker-image dockerfile flask github python3
Last synced: about 1 month ago
JSON representation
This repo is to implement docker with the help of a project demo.
- Host: GitHub
- URL: https://github.com/codeofrahul/docker-mlops
- Owner: CodeofRahul
- License: mit
- Created: 2025-01-05T05:45:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-06T06:41:18.000Z (about 1 year ago)
- Last Synced: 2025-01-30T03:18:55.799Z (about 1 year ago)
- Topics: dagshub, docker, docker-container, docker-image, dockerfile, flask, github, python3
- Language: Python
- Homepage:
- Size: 119 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker-MLOPS
This repo is to implement docker with the help of a project demo.
To run flask app on local host:
```
flask run --host=0.0.0.0 --port=5000
```
- dockerhub : https://app.docker.com/
- docker desktop to download : https://www.docker.com/products/docker-desktop/
- docker docs : https://docs.docker.com/
# Difference Between Docker Images and Containers
| **Aspect** | **Docker Image** | **Docker Container** |
|----------------------|------------------------------------------------------------------------|----------------------------------------------------------------------|
| **What it is** | A file that contains everything your app needs (code, libraries, etc.). | A running version of the image, like the app in action. |
| **State** | Fixed and doesn’t change. | Can change while running. |
| **Purpose** | Acts as a template to create containers. | Runs the app and does the actual work. |
| **Storage** | Stored as a file on your computer. | Runs in memory, but changes can be saved if needed. |
| **How to Create** | Made using a Dockerfile. | Made by running an image. |
| **Usage** | You can’t run it directly. | It’s the actual thing you run. |
| **Changes** | To update, you need to rebuild the image. | You can make live changes, but they won’t change the image. |
| **Example Command** | `docker build -t my-image .` | `docker run my-image` |
## Simple Analogy
- **Docker Image**: Like a recipe for a dish.
- **Docker Container**: Like the actual dish you cook from the recipe.
- To download the image from docker hub :
```
docker pull
docker pull hello-world
```
- To run the image :
```
docker run hello-world
```
- To list all the images :
```
docker images
```
- To list all the containers :
```
docker ps -a
```
- To delete the image :
```
docker rmi
docker rmi hello-world
```
- To delete the container :
```
docker rm
```
- To build a new image from a Dockerfile :
```
docker build -t .
```