{"id":46076051,"url":"https://github.com/ry-ops/getting-started-docker-containers","last_synced_at":"2026-03-01T14:35:02.173Z","repository":{"id":336649522,"uuid":"1143334042","full_name":"ry-ops/getting-started-docker-containers","owner":"ry-ops","description":"Package applications into portable containers with Docker","archived":false,"fork":false,"pushed_at":"2026-02-15T02:26:11.000Z","size":30,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-15T09:37:19.165Z","etag":null,"topics":["containerization","containers","devops","docker","tutorial"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ry-ops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-27T13:04:08.000Z","updated_at":"2026-02-15T02:25:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ry-ops/getting-started-docker-containers","commit_stats":null,"previous_names":["ry-ops/getting-started-docker-containers"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ry-ops/getting-started-docker-containers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry-ops%2Fgetting-started-docker-containers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry-ops%2Fgetting-started-docker-containers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry-ops%2Fgetting-started-docker-containers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry-ops%2Fgetting-started-docker-containers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ry-ops","download_url":"https://codeload.github.com/ry-ops/getting-started-docker-containers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry-ops%2Fgetting-started-docker-containers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29971001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T14:11:48.712Z","status":"ssl_error","status_checked_at":"2026-03-01T14:11:48.352Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["containerization","containers","devops","docker","tutorial"],"created_at":"2026-03-01T14:35:01.643Z","updated_at":"2026-03-01T14:35:02.159Z","avatar_url":"https://github.com/ry-ops.png","language":null,"readme":"# Getting Started with Docker Containers\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"hero.svg\" alt=\"Getting Started with Docker Containers\" width=\"100%\"\u003e\n\u003c/p\u003e\n\nA comprehensive guide to Docker containerization with practical examples and best practices.\n\n## Quick Start\n\n1. **Prerequisites**\n   - Docker installed ([Get Docker](https://docs.docker.com/get-docker/))\n   - Basic understanding of command line\n\n2. **Clone this repository**\n   ```bash\n   git clone https://github.com/ry-ops/getting-started-docker-containers.git\n   cd getting-started-docker-containers\n   ```\n\n3. **Try the examples**\n   ```bash\n   # Node.js application\n   cd examples/node-app\n   docker build -t node-app .\n   docker run -p 3000:3000 node-app\n\n   # Python application\n   cd examples/python-app\n   docker build -t python-app .\n   docker run -p 8000:8000 python-app\n\n   # Multi-stage build\n   cd examples/multi-stage\n   docker build -t multi-stage-app .\n\n   # Docker Compose full-stack\n   cd examples/docker-compose\n   docker-compose up\n   ```\n\n## Repository Structure\n\n```\n.\n├── examples/\n│   ├── node-app/           # Simple Node.js application\n│   ├── python-app/         # Simple Python application\n│   ├── multi-stage/        # Optimized multi-stage builds\n│   └── docker-compose/     # Full-stack app with database\n└── documentation/\n    ├── DOCKERFILE-BEST-PRACTICES.md\n    ├── DOCKER-COMPOSE.md\n    └── OPTIMIZATION.md\n```\n\n## Examples\n\n### Node.js Application\nA simple Express.js web server demonstrating:\n- Multi-stage builds for smaller images\n- Non-root user for security\n- Proper dependency caching\n- Health checks\n\n### Python Application\nA Flask web application showing:\n- Minimal base images (Alpine)\n- Virtual environment best practices\n- Layer optimization\n- Security considerations\n\n### Multi-Stage Builds\nAdvanced examples demonstrating:\n- Build-time vs runtime dependencies\n- Image size optimization\n- Different patterns for various languages\n\n### Docker Compose\nFull-stack application with:\n- Web application\n- PostgreSQL database\n- Redis cache\n- Network configuration\n- Volume management\n\n## Best Practices\n\n### Image Size Optimization\n- Use multi-stage builds to separate build and runtime dependencies\n- Choose minimal base images (Alpine, distroless)\n- Combine RUN commands to reduce layers\n- Use .dockerignore to exclude unnecessary files\n\n### Security\n- Run containers as non-root users\n- Scan images for vulnerabilities\n- Keep base images updated\n- Use specific image tags, not `latest`\n- Minimize installed packages\n\n### Build Efficiency\n- Order Dockerfile instructions from least to most frequently changing\n- Cache dependencies separately from application code\n- Use build cache effectively\n- Leverage BuildKit features\n\n### Production Ready\n- Include health checks\n- Use environment variables for configuration\n- Implement proper logging\n- Set resource limits\n- Use restart policies\n\n## Documentation\n\nComprehensive guides available in the `documentation/` directory:\n\n- **[Dockerfile Best Practices](documentation/DOCKERFILE-BEST-PRACTICES.md)** - Writing efficient and secure Dockerfiles\n- **[Docker Compose Guide](documentation/DOCKER-COMPOSE.md)** - Multi-container applications\n- **[Optimization Techniques](documentation/OPTIMIZATION.md)** - Advanced optimization strategies\n\n## Common Commands\n\n```bash\n# Build an image\ndocker build -t image-name .\n\n# Run a container\ndocker run -p host-port:container-port image-name\n\n# View running containers\ndocker ps\n\n# Stop a container\ndocker stop container-id\n\n# Remove containers\ndocker rm container-id\n\n# View images\ndocker images\n\n# Remove images\ndocker rmi image-name\n\n# View logs\ndocker logs container-id\n\n# Execute command in running container\ndocker exec -it container-id /bin/sh\n\n# Docker Compose\ndocker-compose up           # Start services\ndocker-compose down         # Stop services\ndocker-compose logs         # View logs\ndocker-compose ps           # List services\n```\n\n## Resources\n\n- [Docker Official Documentation](https://docs.docker.com/)\n- [Docker Hub](https://hub.docker.com/)\n- [Dockerfile Reference](https://docs.docker.com/engine/reference/builder/)\n- [Docker Compose Reference](https://docs.docker.com/compose/compose-file/)\n- [Docker Security Best Practices](https://docs.docker.com/engine/security/)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n**ry-ops**\n\n---\n\n**Happy Containerizing!**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fry-ops%2Fgetting-started-docker-containers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fry-ops%2Fgetting-started-docker-containers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fry-ops%2Fgetting-started-docker-containers/lists"}