Skip to content

Latest commit

 

History

History
49 lines (28 loc) · 2.07 KB

File metadata and controls

49 lines (28 loc) · 2.07 KB

CircleCI

Development Docker Image

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.

What's inside

Usage

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

Commands

We can also run a single command through the container, ideal for creating alias or helper scripts for common tasks.

Node / Yarn

  • docker run -it --rm -v $(pwd):/app onefastsnail/development node -v
  • docker run -it --rm -v $(pwd):/app onefastsnail/development yarn install

PHP

  • docker run -it --rm -v $(pwd):/app onefastsnail/development php -v

MySQL

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

Composer

  • docker run -it --rm -v $(pwd):/app onefastsnail/development composer --version
  • docker run -it --rm -v $(pwd):/app onefastsnail/development composer install

WP CLI

  • docker run -it --rm -v $(pwd):/app onefastsnail/development wp --allow-root --version