{"id":27373834,"url":"https://github.com/johnnyhuy/docker-laravel","last_synced_at":"2026-04-13T03:08:18.539Z","repository":{"id":122634618,"uuid":"97102447","full_name":"johnnyhuy/docker-laravel","owner":"johnnyhuy","description":"Docker image of Laravel 5.4 with Alpine.","archived":false,"fork":false,"pushed_at":"2024-05-05T08:55:51.000Z","size":689,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T09:19:14.103Z","etag":null,"topics":["alpine","apache2","docker","docker-image","laravel","php"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/johnnyhuy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-07-13T09:02:08.000Z","updated_at":"2024-05-05T08:55:55.000Z","dependencies_parsed_at":"2024-04-18T21:08:36.817Z","dependency_job_id":null,"html_url":"https://github.com/johnnyhuy/docker-laravel","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnnyhuy%2Fdocker-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnnyhuy%2Fdocker-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnnyhuy%2Fdocker-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnnyhuy%2Fdocker-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnnyhuy","download_url":"https://codeload.github.com/johnnyhuy/docker-laravel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248705222,"owners_count":21148504,"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":["alpine","apache2","docker","docker-image","laravel","php"],"created_at":"2025-04-13T11:28:57.803Z","updated_at":"2026-04-13T03:08:18.502Z","avatar_url":"https://github.com/johnnyhuy.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Alpine powered container for Laravel projects\nThis is a small project I started to effciently start Laravel projects with reduced dev ops delays.\n\n## What does it include?\nThe container includes the following packages installed on Alpine:\n\n- Core utilities: curl, unzip\n- PHP 7.x from apk services\n- PHP extensions required for the Laravel project\n\n## Usage\n### Quick (no database)\nThis is where volumes are used to interact with the container project file. Run the following command to link your project folder.\n\nRun the docker command to pull the image from the Docker repo.\n```\ndocker pull johnnyhuy/laravel\n```\n\nStart a container from the image you have downloaded.\n```\ndocker run -p 80:80 -v $PWD:/var/www/laravel -d johnnyhuy/laravel\n```\nNote: $PWD is the current directory.\n\n### Recommended for development (includes MySQL driver)\nWe'll be using docker compose to create a config file to include the MySQL image and link it to the johnnyhuy/laravel image. Create a **docker-compose.yml** in your project folder as shown.\n\n```\nversion: \"3\"\nservices:\n    web:\n        build: ./\n        image: johnnyhuy/laravel:latest\n        ports:\n            - \"80:80\"\n        volumes:\n            - .:/var/www/laravel\n        links:\n            - \"db:database\"\n    db:\n        image: mysql\n        ports:\n            - 3306:3306\n        environment:\n            MYSQL_ROOT_PASSWORD: \"YOUR ROOT PASSWORD HERE\"\n            MYSQL_DATABASE: \"YOU MYSQL DATABASE NAME HERE (OPTIONAL)\"\n```\n\n## Production use\n### Step 1\nCreate a **docker-compose.yml** in your project folder as shown. Be sure to replace MySQL root password and database.\n```\nversion: \"3\"\nservices:\n    web:\n        build: ./\n        image: johnnyhuy/laravel:latest\n        ports:\n            - \"80:80\"\n            - \"443:443\"\n        links:\n            - \"db:database\"\n    db:\n        image: mysql\n        ports:\n            - 3306:3306\n        environment:\n            MYSQL_ROOT_PASSWORD: \"YOUR ROOT PASSWORD HERE\"\n            MYSQL_DATABASE: \"YOU MYSQL DATABASE NAME HERE (OPTIONAL)\"\n```\nNote: this is similar to the development method but without the volumes.\n\n### Step 2\nDownload the Dockerfile from this [git](https://github.com/johnnyhuy/docker-laravel/blob/master/Dockerfile) or [docker](https://hub.docker.com/r/johnnyhuy/laravel/~/dockerfile/) repository.\n\n### Step 3\nBuild the docker image by running the following command.\n```\ndocker-compose build\n```\n\n### Step 4\nRun the container.\n```\ndocker-compose up -d\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnyhuy%2Fdocker-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnnyhuy%2Fdocker-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnyhuy%2Fdocker-laravel/lists"}