A Docker image to run development commands and tools through. This helps keep the host machine clean of libaries, tools and their numerous versions and also helps keep a consistent set of development tools across a development team and machines.
This repository is put through CircleCI for automated building, testing and deployment to Dockerhub.
To start using this we can directly bash into the container, mounting the current working directory into the container also. This way, we have access to the project and its dependencies such as node_modules
and vendor
packages. Finally we remove the container when we exit or finish, making it disposable.
docker run -it --rm -v $(pwd):/app onefastsnail/development bash
We can also run a single command through the container, ideal for creating alias or helper scripts for common tasks.
docker run -it --rm -v $(pwd):/app onefastsnail/development node -v
docker run -it --rm -v $(pwd):/app onefastsnail/development yarn install
docker run -it --rm -v $(pwd):/app onefastsnail/development php -v
Assuming you have a container named mydb
.
docker run -it --rm -v $(pwd):/app --link mydb onefastsnail/development mysql --host=mydb --user=root --password=pass
docker run -it --rm -v $(pwd):/app onefastsnail/development composer --version
docker run -it --rm -v $(pwd):/app onefastsnail/development composer install
docker run -it --rm -v $(pwd):/app onefastsnail/development wp --allow-root --version