Skip to content

zawyelwin/laravel-installer-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Installer Docker Image

Docker Build Docker Pulls

This repository contains Docker image for the Laravel Installer, providing a convenient way to create Laravel projects for those who use docker as their development environment.

Usage

Pull the Docker Image

To pull the Docker image from Docker Hub, run:

docker pull zylwin/laravel-installer:latest

Create a docker volume for composer cache

docker volume create composer_cache

To create a new Laravel project, run:

docker run -it --rm -v $(pwd):/app -v composer_cache:/composer/cache zylwin/laravel-installer new

Configuring a Shell Alias

You may wish to configure a shell alias to execute commands more easily:

alias laravel='docker run --rm -v $(pwd):/app -v composer_cache:/composer/cache zylwin/laravel-installer'

To make sure this is always available, add this to your shell configuration file in your home directory, such as ~/.zshrc or ~/.bashrc, and then restart your shell.

echo 'alias laravel="docker run --rm -it -v $(pwd):/app -v composer_cache:/composer/cache zylwin/laravel-installer"' >> ~/.zshrc

source ~/.zshrc

laravel new

Build the Docker Image

Alternatively, If they want to update anything in the Dockerfile, you can clone this repository and build the image locally using:

git clone https://github.com/zawyelwin/laravel-installer-docker.git

cd laravel-installer-docker

docker build --build-arg INSTALLER_VERSION=$INSTALLER_VERSION -t <your-dockerhub-username>/laravel-installer .

License

This project is licensed under the MIT license.

Contributing

Contributions are welcome! If you have any improvements or bug fixes, please feel free to open an issue or submit a pull request.

Acknowledgements