{"id":21767516,"url":"https://github.com/saketkothari/docker","last_synced_at":"2026-05-10T19:49:22.881Z","repository":{"id":149769848,"uuid":"456908957","full_name":"SaketKothari/docker","owner":"SaketKothari","description":"🐳 Docker is a container management tool, that makes it easy to run applications on any computer in an isolated container, that includes everything it needs to run predictably. ","archived":false,"fork":false,"pushed_at":"2022-02-21T08:26:45.000Z","size":286,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T02:28:38.270Z","etag":null,"topics":["docker","docker-compose","docker-container","docker-image","docker-volumes","dockerfile"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SaketKothari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-08T11:44:26.000Z","updated_at":"2024-10-19T19:36:31.000Z","dependencies_parsed_at":"2023-06-04T09:45:11.323Z","dependency_job_id":null,"html_url":"https://github.com/SaketKothari/docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaketKothari%2Fdocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaketKothari%2Fdocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaketKothari%2Fdocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaketKothari%2Fdocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SaketKothari","download_url":"https://codeload.github.com/SaketKothari/docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745715,"owners_count":20503048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","docker-container","docker-image","docker-volumes","dockerfile"],"created_at":"2024-11-26T13:25:45.698Z","updated_at":"2026-05-10T19:49:22.871Z","avatar_url":"https://github.com/SaketKothari.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐳 Docker Multi-Container Blog Application\n\nA full-stack blog application demonstrating Docker containerization with a React frontend and Express.js backend API, orchestrated using Docker Compose.\n\n## 📋 Overview\n\nThis project showcases how to containerize a multi-service application using Docker. It consists of:\n\n- **Frontend (myblog)**: A React application that displays blog posts\n- **Backend (api)**: An Express.js REST API that serves blog data\n\nBoth services are containerized and can be run together using Docker Compose.\n\n## 🏗️ Project Structure\n\n```\ndocker/\n├── docker-compose.yaml    # Multi-container orchestration\n├── api/                   # Backend Express.js API\n│   ├── Dockerfile\n│   ├── package.json\n│   └── app.js\n└── myblog/                # Frontend React Application\n    ├── Dockerfile\n    ├── package.json\n    ├── public/\n    └── src/\n        └── App.js\n```\n\n## 🛠️ Tech Stack\n\n| Service  | Technology        | Port |\n|----------|-------------------|------|\n| Frontend | React 17          | 3000 |\n| Backend  | Express.js + Node | 4000 |\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- [Docker](https://docs.docker.com/get-docker/) installed on your machine\n- [Docker Compose](https://docs.docker.com/compose/install/) (included with Docker Desktop)\n\n### Running the Application\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/SaketKothari/docker.git\n   cd docker\n   ```\n\n2. **Start all services with Docker Compose**\n   ```bash\n   docker-compose up\n   ```\n\n3. **Access the application**\n   - Frontend: http://localhost:3000\n   - API: http://localhost:4000\n\n4. **Stop all services**\n   ```bash\n   docker-compose down\n   ```\n\n## 📡 API Endpoints\n\n| Method | Endpoint | Description           |\n|--------|----------|-----------------------|\n| GET    | `/`      | Returns list of blogs |\n\n### Sample Response\n```json\n[\n  { \"id\": \"1\", \"title\": \"Book Review: The Bear \u0026 The Nightingale.\" },\n  { \"id\": \"2\", \"title\": \"Game Review: Pokemon Brilliant Diamond\" },\n  { \"id\": \"3\", \"title\": \"Show Review: Alice in Borderland\" }\n]\n```\n\n## 🐳 Docker Commands Reference\n\n### Basic Commands\n\n| Command | Description |\n|---------|-------------|\n| `docker build -t \u003cname\u003e .` | Build an image from Dockerfile |\n| `docker images` | List all images |\n| `docker ps -a` | List all containers |\n| `docker run --name \u003ccontainer\u003e -p \u003chost\u003e:\u003ccontainer\u003e \u003cimage\u003e` | Run a container |\n| `docker stop \u003ccontainer\u003e` | Stop a running container |\n| `docker start \u003ccontainer\u003e` | Start an existing container |\n\n### Image Management\n\n```bash\n# Build an image\ndocker build -t myapp .\n\n# Build with version tag\ndocker build -t myapp:v1 .\n\n# Remove an image\ndocker image rm myapp\n\n# Force remove an image\ndocker image rm myapp -f\n```\n\n### Container Management\n\n```bash\n# Run container in detached mode with port mapping\ndocker run --name myapp_c -p 4000:4000 -d myapp\n\n# Stop a container\ndocker stop myapp_c\n\n# Remove a container\ndocker container rm myapp_c\n\n# Remove all unused images and containers\ndocker system prune -a\n```\n\n### Docker Compose Commands\n\n```bash\n# Build and start all services\ndocker-compose up\n\n# Build and start in detached mode\ndocker-compose up -d\n\n# Stop and remove containers, networks, images, and volumes\ndocker-compose down --rmi all -v\n\n# View running services\ndocker-compose ps\n```\n\n## 📚 Docker Concepts Covered\n\n| # | Topic |\n|:-:|-------|\n| 1 | What is Docker |\n| 2 | Installing Docker |\n| 3 | Images and Containers |\n| 4 | Parent Images \u0026 Docker Hub |\n| 5 | The Dockerfile |\n| 6 | .dockerignore |\n| 7 | Starting \u0026 Stopping Containers |\n| 8 | Layer Caching |\n| 9 | Managing Images and Containers |\n| 10 | Volumes |\n| 11 | Docker Compose |\n| 12 | Dockerizing a React App |\n| 13 | Sharing Images on Docker Hub |\n\n---\n\nMade with ❤️ by [Saket Kothari](https://github.com/SaketKothari)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaketkothari%2Fdocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaketkothari%2Fdocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaketkothari%2Fdocker/lists"}