A Docker image with PHP, Composer, Laravel, Python and the latest Node.js.
330
This repository provides a Dockerfile for creating a Docker image based on php:8.3-fpm with additional development tools.
By using this image, you can develop Laravel applications (or any PHP or Python applications) without installing all these tools on your local machine.
You can pull the Docker image directly from Docker Hub:
docker pull skillelevator/toolkit
Below are some commonly used commands. The key idea is to mount your current directory ($PWD) to the container's /app directory.
docker run --rm -it -v "$PWD:/app" skillelevator/toolkit laravel new example-app
This command will create a new Laravel project in a directory called example-app under your current working directory.
If you have a file named helloworld.php in your current directory:
docker run --rm -it -v "$PWD:/app" skillelevator/toolkit php test.php
This will execute test.php using the PHP runtime from the container.
docker run --rm -it -v "$PWD:/app" skillelevator/toolkit php --version
Displays the PHP version inside the container.
docker run --rm -it -v "$PWD:/app" skillelevator/toolkit git --version
Displays the Git version inside the container. You can also run any other Git commands this way.
docker run --rm -it -v "$PWD:/app" skillelevator/toolkit npm --version
Displays the npm version inside the container. You can also install dependencies, run build scripts, etc., by replacing npm --version with other npm commands.
docker run --rm -it -v "$PWD:/app" skillelevator/toolkit python --version
This command will print out the python version included in this image.
docker run --rm -it -v "$PWD:/app" skillelevator/toolkit python ANY_PYTHON_SCRIPT.py
This command will execute any python script.
/app.php-fpm.docker-php-entrypoint, ensuring your PHP environment is set up correctly.Under Linux systems or MacOS you can put a function into your i.e. ~/.zshrc or ~/.bashrc
function toolkit() {
docker run --rm -it -v "$PWD:/app" skillelevator/toolkit:latest "$@"
}
So you are able to execute the toolkit like
toolkit python --version
This project is open-sourced software licensed under the MIT license.
Feel free to open issues or submit pull requests for improvements or suggestions!
Content type
Image
Digest
sha256:70c380cb2…
Size
286.9 MB
Last updated
over 1 year ago
docker pull skillelevator/toolkit