Skip to content

testing database does not get created on initial build #843

@chrispelzer

Description

@chrispelzer

Sail Version

1.51.0

Laravel Version

12.44.0

PHP Version

8.5

Operating System

macOS

OS Version

26.2

Description

The starting up the of mysql container will fail due to the creating of the testing database script not having the permissions for executable, though only when the runtime is published to the project using php artisan sail:publish since it will reference the files under /docker/mysql or mariadb or pgsql.

Error within the Mysql container

2025-12-30 01:27:51+00:00 [Note] [Entrypoint]: Giving user sail access to schema bug_report


/usr/local/bin/docker-entrypoint.sh: /docker-entrypoint-initdb.d/10-create-testing-database.sh: /usr/bin/env: bad interpreter: Permission denied

2025-12-30 01:27:51+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/10-create-testing-database.sh
drwxr-xr-x@  3 chrispelzer  staff   96 Dec 29 20:27 .
drwxr-xr-x@ 11 chrispelzer  staff  352 Dec 29 20:27 ..
-rw-r--r--@  1 chrispelzer  staff  297 Dec 29 20:27 create-testing-database.sh
❯ pwd
/Users/chrispelzer/Sites/bug-report/docker/mysql

Shutting down docker and starting it back up will allow the mysql container to successfully run, but there is then no testing database created.

Steps To Reproduce

  1. Create a new Laravel Sail application
    laravel new bug-report
  2. Install Laravel Sail
    php artisan sail:install
  3. Select mysql though I'm assuming same issue with mariadb and pgsql as well
  4. Publish Sail runtime
    php artisan sail:publish
  5. Start up sail
    sail up -d

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions