{"id":28194485,"url":"https://github.com/jesuserro/docker","last_synced_at":"2026-04-29T02:42:53.336Z","repository":{"id":131508378,"uuid":"594125424","full_name":"jesuserro/docker","owner":"jesuserro","description":"Customized images based on PHP/XDEBUG for web development. ","archived":false,"fork":false,"pushed_at":"2024-06-11T19:05:46.000Z","size":3975,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T23:35:45.037Z","etag":null,"topics":["docker","docker-container","dockerfile"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/jesuserro.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,"zenodo":null}},"created_at":"2023-01-27T16:55:47.000Z","updated_at":"2024-06-11T19:05:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"514a14a2-3405-4f2a-99ce-675bcd2edcd9","html_url":"https://github.com/jesuserro/docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jesuserro/docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesuserro%2Fdocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesuserro%2Fdocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesuserro%2Fdocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesuserro%2Fdocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jesuserro","download_url":"https://codeload.github.com/jesuserro/docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesuserro%2Fdocker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32408446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T02:37:21.628Z","status":"ssl_error","status_checked_at":"2026-04-29T02:36:50.947Z","response_time":110,"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":["docker","docker-container","dockerfile"],"created_at":"2025-05-16T13:12:16.518Z","updated_at":"2026-04-29T02:42:53.315Z","avatar_url":"https://github.com/jesuserro.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My Docker Garden\n\nSimple examples of using Docker. Creation of containers with PHP 7/8 and XDebug.\nIt is made from:\n\n- Alpine Linux image: \u003chttps://hub.docker.com/_/alpine\u003e ([Dockerfile.70](https://github.com/jesuserro/docker/blob/main/Dockerfile.70))\n- Official PHP image: \u003chttps://hub.docker.com/_/php\u003e ([Dockerfile.81](https://github.com/jesuserro/docker/blob/main/Dockerfile.81))\n\nThese Dockerfiles are based on the official images, but they have been modified to install XDebug and other extensions.\n\n## Installation\n\n``` shell\nmkdir ~/proyectos \u0026\u0026 cd ~/proyectos\ngit clone https://github.com/jesuserro/docker.git\n```\n\n## File Structure\n\n``` shell\n📦home\n ┣ 📂jesus\n ┃ ┗ 📂proyectos\n ┃ ┃ ┗ 📂docker\n ┃ ┃ ┗ 📂project-1\n ┃ ┃ ┗ 📂ofertas\n ┃ ┃ ┗ 📂nges\n```\n\n## Usage\n\n### Run containers\n\n``` shell\ncd ~/proyectos/docker\n\n# Run/Launch container for php 7.0\ndocker compose up\ndocker-compose docker-compose.dev.yml up\n\n# Run/Launch all containers for php 7.0 and php 8\ndocker-compose -f docker-compose.yml -f docker-compose.dev.yml up\n```\n\n### In your browser\n\n- \u003chttp://localhost:8070\u003e\n- \u003chttp://localhost:8081\u003e\n- \u003chttp://localhost:8070/ofertas/public/admin/index.php\u003e\n- \u003chttp://localhost:8081/nges/public/\u003e\n\n### Regenerating containers\n\n``` shell\n# Create new image called \"my-php-image70\" from existing \"Dockerfile.70\"\ndocker build -t my-php-image70 -f Dockerfile.70 .\ndocker build -t my-php-image81 -f Dockerfile.81 .\n\n# Run new container instance called \"my-php-container70\" based on existing image \"my-php-image70\"\ndocker run -d -p 8070:80 --name my-php-container70 my-php-image70 -v /home/jesus/proyectos:/var/www/html\ndocker run -d -p 8081:80 --name my-php-container81 my-php-image81 -v /home/jesus/proyectos:/var/www/html\n```\n\n### Other commands\n\n``` shell\n# Start terminal session inside the \"my-php-container70\" container\ndocker exec -it my-php-container70 /bin/bash\n\n# Show container logs\ndocker logs my-php-container70\n\n# Stopping a container\ndocker stop my-php-container70\n\n# Removing all docker containers  \ndocker container rm -f $(docker container ls -aq)\n\n# Removing all docker images  \ndocker rmi $(docker images -q)\n\n# Removing all in 1 sentence\ndocker container rm -f $(docker container ls -aq) \u0026\u0026 docker rmi $(docker images -q)\n\n# Full remove\ndocker system prune -a\n\n# Borrado total de la caché\ndocker builder prune -a\n```\n\n## XDEBUG\n\nIn your WSL2 terminal, run this command to get your IP address:\n\n``` shell\nip addr show eth0 | grep -oP '(?\u003c=inet\\s)\\d+(\\.\\d+){3}'\n  # Returning: 172.20.28.159\n```\n\n### XDebug 2.5.5/PHP 7.0\n\nSo put it at the `xdebug.ini` file:\n\n``` shell\nxdebug.remote_host = 172.20.28.159\n```\n\n### XDebug 3/PHP 8+\n\nNo need IP definition, so put it at the `xdebug.ini` file:\n\n``` shell\nxdebug.remote_host=host.docker.internal\n```\n\nand in the `docker-compose.dev.yml` file, beware of these environment configurations:\n\n``` shell\n  environment:\n    XDEBUG_MODE: develop,debug\n    XDEBUG_CONFIG:\n      client_host=host.docker.internal\n      start_with_request=yes\n```\n\nIt might be breaking the breakpoint debug.\n\n## VSCODE\n\nIf the IP is correct, you should see the Call Stack requests in the Debug Pane at VSCODE.\nNow, in the `launch.json` in your VSCODE project, add this:\n\n``` shell\n{\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"name\": \"Listen for XDebug on Docker\",\n            \"type\": \"php\",\n            \"request\": \"launch\",\n            \"port\": 9003,\n            \"pathMappings\": {\n                \"/var/www/html/docker/\": \"${workspaceFolder}/\"\n            },\n            \"log\": true,\n            \"ignore\": [\n                \"**/vendor/**/*.php\"\n            ]\n        }\n    ]\n}\n```\n\nAt Debug Console we'll see:\n\n``` shell\nListening on { address: '::', family: 'IPv6', port: 9003 }\n```\n\n### Php Executable\n\n``` shell\n# Getting executable from the container\ndocker cp php70-apache:/usr/local/bin/php ./var/bin/php\n# In VSCODE settings.json\n\"php.executablePath\": \"./var/bin/php\"\n\n# Executable from your local LAMP\nwhich php\n# In VSCODE settings.json\n\"php.executablePath\": \"/usr/bin/php\"\n```\n\n## Tutoriales\n\n### DOCKER De NOVATO a PRO! (CURSO COMPLETO EN ESPAÑOL)\n\n[![DOCKER De NOVATO a PRO! (CURSO COMPLETO EN ESPAÑOL)](https://img.youtube.com/vi/CV_Uf3Dq-EU/0.jpg)](https://www.youtube.com/watch?v=CV_Uf3Dq-EU)\n\n### Aprende Docker en 14 minutos 🐳\n\n[![Aprende Docker en 14 minutos 🐳](https://img.youtube.com/vi/6idFknRIOp4/0.jpg)](https://www.youtube.com/watch?v=6idFknRIOp4)\n\n## Otros enlaces de interés\n\n### De PHP 5.3 a PHP 8.2\n\nDocker containers are useful for testing your code in different PHP versions. This video shows how to use Docker to test your code in PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, and 8.1.\n[![De PHP 5.3 a PHP 8.2](https://img.youtube.com/vi/BHAYO6esXlw/0.jpg)](https://www.youtube.com/watch?v=BHAYO6esXlw)\n\n- [Migración de Zend Framework 1 a PHP 8.1](https://github.com/Shardj/zf1-future)\n- [Terraform](https://registry.terraform.io/) a cloud management service for AWS, Google Cloud, Azure, and so on.\n\n## Interesting Dockerfiles\n\n- \u003chttps://github.com/PauGa9/php-symfony-mysql-nginx-docker\u003e\n- \u003chttps://github.com/thecodeholic/php-mvc-framework/blob/master/docker/php.ini\u003e\n- \u003chttps://jasonterando.medium.com/debugging-with-visual-studio-code-xdebug-and-docker-on-windows-b63a10b0dec\u003e\n- \u003chttps://github.com/thecodeholic/php-mvc-framework\u003e\n- \u003chttps://stackoverflow.com/questions/52579102/debug-php-with-vscode-and-docker\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesuserro%2Fdocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjesuserro%2Fdocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesuserro%2Fdocker/lists"}