{"id":22970715,"url":"https://github.com/janole/laravel-dockerize","last_synced_at":"2025-08-13T11:33:45.040Z","repository":{"id":41514099,"uuid":"187505128","full_name":"janole/laravel-dockerize","owner":"janole","description":"A very simple tool to containerize your Laravel App ...","archived":false,"fork":false,"pushed_at":"2024-11-25T13:18:57.000Z","size":143,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-25T13:26:53.094Z","etag":null,"topics":["containerize","docker","dockerize","laravel","laravel-dockerize","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/janole.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}},"created_at":"2019-05-19T17:06:31.000Z","updated_at":"2024-11-25T13:17:58.000Z","dependencies_parsed_at":"2024-08-27T12:05:43.262Z","dependency_job_id":null,"html_url":"https://github.com/janole/laravel-dockerize","commit_stats":{"total_commits":89,"total_committers":3,"mean_commits":"29.666666666666668","dds":0.4157303370786517,"last_synced_commit":"a899848605451c051f25deb7520c7201b9173490"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janole%2Flaravel-dockerize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janole%2Flaravel-dockerize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janole%2Flaravel-dockerize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janole%2Flaravel-dockerize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janole","download_url":"https://codeload.github.com/janole/laravel-dockerize/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229759841,"owners_count":18119874,"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":["containerize","docker","dockerize","laravel","laravel-dockerize","php"],"created_at":"2024-12-14T22:14:24.798Z","updated_at":"2024-12-14T22:14:25.824Z","avatar_url":"https://github.com/janole.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-dockerize\nA very simple tool to containerize your Laravel App ...\n\n## What? Why?\nDo you want to easily create a Docker image from your Laravel App? Then this project wants to become your friend ;-)\n\n\u003e !! NOTICE !! So far, this project is severely limited to some base dependencies (like PostgreSQL for example.)\n\n## Installation\n```console\n$ composer require janole/laravel-dockerize\n```\n\n## Usage\n\n**1. First, you need to specify the (base-)name of the docker image**. Add the following variable to your `.env` file:\n\n```\nDOCKERIZE_IMAGE=\"my-shiny-new-app\"\n```\n\nor\n\n```\nDOCKERIZE_IMAGE=\"my-own.docker-registry.com/my-shiny-new-app\"\n```\n\n\u003e If you're using git, `laravel-dockerize` will try to automatically add some version and branch tags to the image name.\n\n**2. Now build the image:**\n\n```console\n$ php artisan docker:build\ncd /Users/ole/projects/Laravel/test-app \u0026\u0026 docker build -t my-shiny-new-app:0.1-master .\n...\n* Successfully tagged my-shiny-new-app:0.1-master\n```\n\nYay! Now you've got your first image named `my-shiny-new-app:0.1-master`\n\n\u003e !! NOTICE !! The Dockerfile used to create the image will be automatically saved in your project's root.\n\n**3. Create a docker-compose.yml file in the project root:**\n\n```console\n$ php artisan docker:compose -s \nFile saved as /Users/ole/projects/Laravel/test-app/docker-compose.yml\n```\n\n**4. Run the project via docker-compose:**\n\n```console\n$ docker-compose up [-d]\nCreating network \"test-app_default\" with the default driver\nCreating volume \"test-app_postgres-data\" with default driver\nCreating test-app_database_1 ... done\nCreating test-app_app_1      ... done\n```\n\n### Internals ...\n\n- **laravel-dockerize** will add another *artisan* command to your project: `container:startup`. This command will be automatically called each time the container is (re-)started and it will try to initialize the database for you. For this, it will wait for the database to be ready, call `php artisan migrate --force` and then try to run the initial seeders `DOCKERIZE_SEED1` or updating seeders `DOCKERIZE_SEED2` (if the database wasn't fresh.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanole%2Flaravel-dockerize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanole%2Flaravel-dockerize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanole%2Flaravel-dockerize/lists"}