Sign inSign up

skillelevator/toolkit

By skillelevator

•Updated over 1 year ago

A Docker image with PHP, Composer, Laravel, Python and the latest Node.js.

Image
Languages & frameworks
0

330

skillelevator/toolkit repository overview

⁠Laravel & Node.js Development Environment Image

This repository provides a Dockerfile for creating a Docker image based on php:8.3-fpm with additional development tools.


⁠What's Included

  • PHP 8.3 (FPM)
  • Composer (for PHP package management)
  • Laravel Installer (for easy project scaffolding)
  • Git (for version control)
  • Node.js & npm (for JavaScript/Node.js development)
  • Python 3.11.2

By using this image, you can develop Laravel applications (or any PHP or Python applications) without installing all these tools on your local machine.


⁠Getting Started

⁠Pull the Docker Image

You can pull the Docker image directly from Docker Hub:

docker pull skillelevator/toolkit

⁠Usage Examples

Below are some commonly used commands. The key idea is to mount your current directory ($PWD) to the container's /app directory.

⁠1. Create a new Laravel project
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.


⁠2. Run a simple PHP script

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.


⁠3. Check PHP version
docker run --rm -it -v "$PWD:/app" skillelevator/toolkit php --version

Displays the PHP version inside the container.


⁠4. Use Git
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.


⁠5. Check npm version
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.


⁠6. Working with python
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.


⁠Notes

  • Working Directory: The container’s default working directory is /app.
  • Default Command: When no command is provided, the container runs php-fpm.
  • Entry Point: Uses docker-php-entrypoint, ensuring your PHP environment is set up correctly.

⁠Tip:

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

⁠License

This project is open-sourced software licensed under the MIT license⁠.

Feel free to open issues or submit pull requests for improvements or suggestions!

Tag summary

Content type

Image

Digest

sha256:70c380cb2…

Size

286.9 MB

Last updated

over 1 year ago

docker pull skillelevator/toolkit