{"id":25808172,"url":"https://github.com/nullstone-io/docker-laravel","last_synced_at":"2026-04-12T13:02:42.070Z","repository":{"id":41796870,"uuid":"399474693","full_name":"nullstone-io/docker-laravel","owner":"nullstone-io","description":"Base docker image for Laravel that works out-of-the-box.","archived":false,"fork":false,"pushed_at":"2023-07-22T12:38:51.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-22T13:42:25.011Z","etag":null,"topics":["docker","laravel","nginx","nullstone","php"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/nullstone-io.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}},"created_at":"2021-08-24T13:25:22.000Z","updated_at":"2022-07-06T21:29:24.000Z","dependencies_parsed_at":"2022-08-11T17:42:15.707Z","dependency_job_id":null,"html_url":"https://github.com/nullstone-io/docker-laravel","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Fdocker-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Fdocker-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Fdocker-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Fdocker-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nullstone-io","download_url":"https://codeload.github.com/nullstone-io/docker-laravel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241064519,"owners_count":19903284,"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","laravel","nginx","nullstone","php"],"created_at":"2025-02-27T21:59:31.515Z","updated_at":"2025-12-31T01:12:19.568Z","avatar_url":"https://github.com/nullstone-io.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nullstone/laravel\n\nLaravel Base Image that is configured with different image tags for local and production.\nThis image is very opinionated; however, not restrictive.\n\n## Quick Reference\n\n- Maintained by\n  [Nullstone](https://nullstone.io)\n- Where to get help\n  [Nullstone Slack](https://join.slack.com/t/nullstone-community/signup)\n\n## Supported Tags and respective `Dockerfile` links\n\n- [latest,php8,php8.1](php8.1/Dockerfile)\n- [local,php8-local,php8.1-local](php8.1/local.Dockerfile)\n- [php8.0](php8.0/Dockerfile)\n- [php8.0-local](php8.0/local.Dockerfile)\n\n## Production\n\nThe production image is configured with:\n- Server optimized for [php-fpm](https://php-fpm.org/).\n- Logs are emitted to stdout/stderr.\n- The resulting image is small (~37mb).\n- Preconfigured to attach [nginx](https://www.nginx.com/) sidecar container. See below.\n\n## Local Image\n\nThe local image is configured with:\n- Server is run with `php artisan serve`\n- Hot-reloading and debugging is enabled\n- Logs are emitted to stdout/stderr\n\n## Automatic Env Variables\n\nOn boot, this docker image automatically configures several environment variables. \n1. If `POSTGRES_URL` is set, `DB_CONNECTION=pgsql` and `DATABASE_URL=$POSTGRES_URL`.\n2. If `MYSQL_URL` is set, `DB_CONNECTION=mysql` and `DATABASE_URL=$MYSQL_URL`.\n3. If `NULLSTONE_ENV` is set, `APP_ENV=$NULLSTONE_ENV`.\n\n## Local Development\n\nWhen developing locally, it's common to add/update/remove packages to your application.\nAfter updating your dependencies, restart your docker container.\nOn boot, the dependencies will be installed with `composer install`.\n\n## Nginx sidecar\n\nThis image is configured to easily connect a sidecar container running nginx.\nBy doing so, nginx can serve static assets with php requests forwarded to this container.\n\nThere are 3 volumes exposed in this image that are shared with the nginx sidecar.\nThese volumes automatically configure nginx to serve static assets and php properly.\n\nSee [examples/basic/docker-compose.yml](examples/basic/docker-compose.yml) for working example for local development.\n\n## Swap mysql for postgresql\n\nUpdate `docker-compose.yml`. See full example at [examples/postgres/docker-compose.yml](examples/postgres/docker-compose.yml).\n```\nservices:\n  app:\n    ...\n    environment:\n      ...\n      - MYSQL_URL=mysql://acme:acme@db:3306/acme\n  ...\n  db:\n    image: mysql\n    ports:\n      - \"3306:3306\"\n    environment:\n      - MYSQL_USER=acme\n      - MYSQL_PASSWORD=acme\n      - MYSQL_DATABASE=acme\n```\n\n\n## Add redis\n\nUpdate `docker-compose.yml`. See full example at [examples/redis/docker-compose.yml](examples/redis/docker-compose.yml).\n```\nservices:\n  app:\n    ...\n    environment:\n      ...\n      - CACHE_DRIVER=redis\n      - REDIS_URL=tcp://redis:6379/0\n  ...\n  redis:\n    image: redis:6-alpine\n    ports:\n      - \"6379:6379\"\n```\n\nInstall redis to `Dockerfile`.\n```dockerfile\nRUN apk add --no-cache pcre-dev $PHPIZE_DEPS \\\n  \u0026\u0026 pecl install redis \\\n  \u0026\u0026 rm -rf /tmp/pear \\\n  \u0026\u0026 docker-php-ext-enable redis.so\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullstone-io%2Fdocker-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnullstone-io%2Fdocker-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullstone-io%2Fdocker-laravel/lists"}