Docker image pre-built for using Laravel Sail as part of local development
1.3K
Larasail provides a pre-built image to start developing applications with Laravel Sail.
Sail provides a Docker powered local development experience for Laravel that is compatible with macOS, Windows (WSL2), and Linux. Other than Docker, no software or libraries are required to be installed on your local computer before using Sail. Sail's simple CLI means you can start building your Laravel application without any previous Docker experience.
As Larasail works best with Laravel Sail, it is recommended to install it within your project using composer.
composer require --dev laravel/sail
With Larasail, your project root must be mapped into /var/www/html directory of the image.
Larasail has been configured with /var/www/html as the default working directory.
Using the larasail image to serve your Laravel project is simple:
docker run -d -p 8000:80 -v $(pwd):/var/www/html raazpuspa/larasail:tag
Example docker-compose.yml
version: '3.1'
services:
laravel.test:
image: raazpuspa/larasail:tag
container_name: webserver
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '${APP_PORT:-80}:80'
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
environment:
LARAVEL_SAIL: 1
WWWUSER: '${WWWUSER:-1000}'
WWWGROUP: '${WWWGROUP:-1000}'
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
volumes:
- '.:/var/www/html'
networks:
- internal
networks:
internal:
driver: bridge
| Variable | Default | Description |
|---|---|---|
| TZ | UTC | define timezone of the underlying unix system |
| EDITOR | vim | define default editor application for the system |
| WWWUSER | 1000 | define ID for the current user of local machine |
| WWWGROUP | 1000 | define ID for the group of current user of local machine |
All available tags of larasail includes PHP of selected version and following packages:
Following extensions are available in every tag:
php-bcmathphp-cliphp-curlphp-devphp-gdphp-igbinaryphp-imapphp-intlphp-ldapphp-mbstringphp-memcachedphp-msgpackphp-mysqlphp-pcovphp-pgsqlphp-readlinephp-redisphp-soapphp-sqlite3php-xdebugphp-xmlphp-zipAll tags include support for MS-SQL Server:
unixodbcphp-sybasephp-sqlsrvpdo_sqlsrvThe wkhtmltopdf is available with all wkhtml versions.
Content type
Image
Digest
sha256:d1e63aba9…
Size
872 MB
Last updated
5 months ago
docker pull raazpuspa/larasail