Development is a compact and efficient Docker image, created to make it easier to perform multiple tasks in a web project, such as environment configurations, installing dependencies or compiling code.
Development is a Docker image created using the Linux distribution Alpine. Some common packages for web projects, such as PHP, Node.js, NPM, Composer, and Git, have been added to facilitate the execution of common tasks. There is the possibility to install additional PHP extensions, as well as more packages and other configurations through the environment variables. Some tasks can also be executed automatically, such as package updates, repository cloning, repository updates, dependency installation, and code compilation, making the user's work easier.
Follow the steps below to build the Docker image:
- Clone the repository with the command:
git clone https://github.com/joaopinto14/Development.git
- Navigate to the project directory with the command:
cd Development
- Build the Docker image with the command:
docker build -t development .
- AUTO_UPDATE: If set to
true
, the image will automatically update the installed packages. Default: false - PHP_EXTENSIONS: The PHP extensions to be installed. Default: null (e.g.: pdo_mysql mysqli)
- ADDITIONAL_PACKAGES: Additional packages to be installed. Default: null (e.g.: git zip unzip)
- TIMEZONE: The timezone to be used by system. Default: UTC (List of Timezones)
- GITHUB_REPO: The repository of the project. Default: null (e.g.: joaopinto14/Development)
- GITHUB_USERNAME: The username of the GitHub account. Default: null (e.g.: joaopinto14)
- GITHUB_TOKEN: The GitHub token to access the repository. Default: null
- GITHUB_BRANCH_TAG: The branch or tag of the repository.
- GITHUB_AUTO_UPDATE: If set to
true
, the image will automatically update the repository. Default: false - COMPOSER_INSTALL: If set to
true
, the image will install the dependencies using Composer. Default: false - NPM_INSTALL: If set to
true
, the image will install the dependencies using NPM. Default: false - NPM_BUILD: If set to
true
, the image will compile the code using NPM. Default: false
- Using the command line:
docker run -it --rm \
-e AUTO_UPDATE=true \
-e PHP_EXTENSIONS=pdo_mysql mysqli \
-e ADDITIONAL_PACKAGES=git zip unzip \
-e TIMEZONE=America/Sao_Paulo \
-e GITHUB_REPO=joaopinto14/Development \
-e GITHUB_USERNAME=joaopinto14 \
-e GITHUB_TOKEN=your_token \
-e GITHUB_BRANCH_TAG=main \
-e GITHUB_AUTO_UPDATE=true \
-e COMPOSER_INSTALL=true \
-e NPM_INSTALL=true \
-e NPM_BUILD=true \
development
- Using Docker Compose:
services:
development:
image: development
environment:
- AUTO_UPDATE=true
- PHP_EXTENSIONS=pdo_mysql mysqli
- ADDITIONAL_PACKAGES=git zip unzip
- TIMEZONE=America/Sao_Paulo
- GITHUB_REPO=joaopinto14/Development
- GITHUB_USERNAME=joaopinto14
- GITHUB_TOKEN=your_token
- GITHUB_BRANCH_TAG=main
- GITHUB_AUTO_UPDATE=true
- COMPOSER_INSTALL=true
- NPM_INSTALL=true
- NPM_BUILD=true
If you find any issues related to the image or have suggestions for improvements, do not hesitate to open an issue on GitHub. Please provide as many details as possible to assist in resolving the issue or implementing your suggestion.
- João Pinto (Developer)
This project is licensed under the MIT license - see the LICENSE.md file for more details.