{"id":24370646,"url":"https://github.com/emmyaniedev/laravel_docker_starter_kit","last_synced_at":"2026-04-11T06:42:30.606Z","repository":{"id":272563613,"uuid":"896365116","full_name":"EmmyAnieDev/Laravel_Docker_Starter_Kit","owner":"EmmyAnieDev","description":"This project is a streamlined setup for running Laravel applications using Docker. It simplifies containerized development with pre-configured Docker and Docker Compose files, enabling seamless integration of services like PHP, MySQL, and more. Perfect for developers looking to quickly deploy and manage Laravel applications in isolated environments","archived":false,"fork":false,"pushed_at":"2025-01-15T07:58:00.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T11:13:53.492Z","etag":null,"topics":["docker","docker-compose","docker-container","docker-image","dockerfile"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/EmmyAnieDev.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":"2024-11-30T06:52:10.000Z","updated_at":"2025-01-15T08:03:26.000Z","dependencies_parsed_at":"2025-01-15T09:54:25.537Z","dependency_job_id":"f9574862-e556-43cc-abaf-d009f4574b5c","html_url":"https://github.com/EmmyAnieDev/Laravel_Docker_Starter_Kit","commit_stats":null,"previous_names":["emmyaniedev/laravel_docker_example-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmyAnieDev%2FLaravel_Docker_Starter_Kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmyAnieDev%2FLaravel_Docker_Starter_Kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmyAnieDev%2FLaravel_Docker_Starter_Kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmyAnieDev%2FLaravel_Docker_Starter_Kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmmyAnieDev","download_url":"https://codeload.github.com/EmmyAnieDev/Laravel_Docker_Starter_Kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243205246,"owners_count":20253425,"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","dockerfile"],"created_at":"2025-01-19T04:47:50.914Z","updated_at":"2025-12-26T06:27:38.125Z","avatar_url":"https://github.com/EmmyAnieDev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Demo App - Docker Setup\n\n## What is Docker?\n\nDocker is an open platform for developing, shipping, and running applications. It enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure the same way you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.\n\n## Key Docker Concepts\n\n### Dockerfile\n\nA `Dockerfile` is a text document that contains all the commands you would normally execute manually to assemble an image. Using a `Dockerfile`, you can automate the steps of creating a Docker image, ensuring consistency across different environments.\n\n**Example of a Dockerfile for Laravel:**\n\n```Dockerfile\n# Base image\nFROM php:8.1-fpm\n\n# Install dependencies\nRUN apt-get update \\\n    \u0026\u0026 apt-get install -y \\\n       build-essential \\\n       libpng-dev \\\n       libjpeg-dev \\\n       libfreetype6-dev \\\n       libonig-dev \\\n       libxml2-dev \\\n       zip \\\n       unzip \\\n    \u0026\u0026 docker-php-ext-configure gd --with-freetype --with-jpeg \\\n    \u0026\u0026 docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd\n\n# Set working directory\nWORKDIR /var/www\n\n# Copy files\nCOPY . /var/www\n\n# Install Composer\nCOPY --from=composer:2.2 /usr/bin/composer /usr/bin/composer\nRUN composer install\n\n# Expose port 9000 and start PHP-FPM\nEXPOSE 9000\nCMD [\"php-fpm\"]\n```\n\n### Docker Image\n\nA Docker image is a lightweight, standalone, and executable software package that includes everything needed to run a piece of software, including the code, runtime, libraries, and system tools. Think of an image as a blueprint for creating containers.\n\n**Building an image from a Dockerfile:**\n\n```bash\ndocker build -t laravel-app .\n```\n\n### Docker Container\n\nA Docker container is a runnable instance of a Docker image. It provides a lightweight and portable environment for running your application. You can create, start, stop, move, or delete a container using Docker commands.\n\n**Running a container from an image:**\n\n```bash\ndocker run -d -p 8000:80 laravel-app\n```\n\n### Docker Volumes\n\nVolumes are used to persist data generated or used by Docker containers. By default, containers are stateless, and all data is lost when the container is stopped or removed. Volumes allow you to store data outside the container and reuse it across multiple containers.\n\n**Example of using a volume:**\n\n```bash\ndocker run -v $(pwd):/var/www -p 8000:80 laravel-app\n```\n\n### Docker Compose\n\nDocker Compose is a tool for defining and running multi-container Docker applications. Using a `docker-compose.yml` file, you can configure the services your application needs, such as a web server, database, and caching service, in a single file.\n\n**Example of a docker-compose.yml for Laravel:**\n\n```yaml\nversion: \"3.8\"\n\nservices:\n    app:\n        build:\n            context: .\n            dockerfile: Dockerfile\n        volumes:\n            - .:/var/www\n        ports:\n            - \"8000:80\"\n        depends_on:\n            - db\n\n    db:\n        image: mysql:8.0\n        restart: always\n        environment:\n            MYSQL_DATABASE: laravel\n            MYSQL_USER: root\n            MYSQL_PASSWORD: secret\n            MYSQL_ROOT_PASSWORD: secret\n        volumes:\n            - db-data:/var/lib/mysql\n\nvolumes:\n    db-data:\n```\n\n**Starting services using Docker Compose:**\n\n```bash\ndocker-compose up -d\n```\n\n## How to Run This Laravel App with Docker\n\n1. Clone the repository.\n2. Ensure Docker and Docker Compose are installed on your system.\n3. Build the Docker image:\n    ```bash\n    docker-compose build\n    ```\n4. Start the application:\n    ```bash\n    docker-compose up -d\n    ```\n5. Open your browser and navigate to `http://localhost:8000`.\n\n## Notes\n\n-   Use `docker-compose down` to stop and remove containers, networks, and volumes.\n-   For Laravel migrations, run:\n    ```bash\n    docker exec -it \u003ccontainer_name\u003e php artisan migrate\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmyaniedev%2Flaravel_docker_starter_kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femmyaniedev%2Flaravel_docker_starter_kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmyaniedev%2Flaravel_docker_starter_kit/lists"}