https://github.com/allanavelar/local-docker-dev
📦 Dockerize your local development tools with custom environments for PHP, Node, Go & more
https://github.com/allanavelar/local-docker-dev
docker local-development
Last synced: 6 months ago
JSON representation
📦 Dockerize your local development tools with custom environments for PHP, Node, Go & more
- Host: GitHub
- URL: https://github.com/allanavelar/local-docker-dev
- Owner: allanavelar
- License: mit
- Created: 2021-11-16T00:19:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-16T02:48:57.000Z (over 4 years ago)
- Last Synced: 2025-11-22T23:25:41.401Z (8 months ago)
- Topics: docker, local-development
- Language: Dockerfile
- Homepage:
- Size: 205 KB
- Stars: 6
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Contributing: contributing.md
- License: license.md
Awesome Lists containing this project
README
## Table of contents
- [Table of contents](#table-of-contents)
- [Quick start](#quick-start)
- [Bugs and feature requests](#bugs-and-feature-requests)
- [Contributing](#contributing)
- [Creators](#creators)
- [Copyright and license](#copyright-and-license)
## Quick start
`local-docker-dev` is a Docker-based tool to allow developers running app maintenance scripts inside containers, without writing a single line of Dockerfile. This is useful specially to run command-line tools, you won't need to have your own docker files to do that.
When you run `local-docker-dev [IMAGE] [COMMAND]` in your current directory, it will mount it as delegated volume, together with some of your `$HOME` files(*) and folders needed to run tasks like `git push`, `npm publish`, `composer install`, etc. which usually require credentials.
(*) *From your $HOME, it only mounts the following (read-only): `~/.npmrc`, `~/.composer/auth.json`, `~/.gitconfig`, `~/.gitignore_global`*
## Setup
You can clone this repository and run `bin/local-docker-dev-init`, then you will have to manually config the `bin` directory in your `$PATH` variable to have `local-docker-dev` available everywhere.
Alternatively, if you have node installed in your OS, you can install it globally with `npm`.
```bash
npm i -g @allanavelar/local-docker-dev && \
local-docker-dev-init
```
The Docker images are built by you, so you can customize this project to your needs and run `local-docker-dev-init` every time you need.
## Supported Languages
Node & npm:
- `node`
- `node:15`
- `node:16`, `node:latest`, `node`
- `npm` (runs on `node:latest`)
PHP & composer:
- `php`
- `php:7`
- `php:7-xdebug`
- `php:8`, `php:latest`, `php`
- `php:8-xdebug`
- `composer` (runs on `php:latest`)
Go (planned):
- `go`
- `go:1.15`
- `go:1.16`
- `go:latest`
## Usage
```bash
# Usage template:
local-docker-dev [LANG]:[VERSION] [COMMAND] [...PARAMETERS]
```
```bash
# Examples:
local-docker-dev node:16 node --version
local-docker-dev node npm install
local-docker-dev npm install
local-docker-dev php:8 php --ini
local-docker-dev php composer install
local-docker-dev composer install
# Running phpunit with code coverage:
local-docker-dev php:7-xdebug XDEBUG_MODE=coverage vendor/bin/phpunit
```
## Bugs and feature requests
Have a bug or a feature request? Please first read the [issue guidelines](./contributing.md) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/allanavelar/local-docker-dev/issues/new).
## Contributing
Please read through our [contributing guidelines](./contributing.md). Included are directions for opening issues, coding standards, and notes on development.
Moreover, all HTML and CSS should conform to the [Code Guide](./code-guide.md), maintained by [Main author](https://github.com/allanavelar).
Editor preferences are available in the [editor config](./.editorconfig) for easy use in common text editors. Read more and download plugins at .
## Creators
[](https://github.com/allanavelar) |
--- |
[▲▼ Allan Avelar ۞](https://github.com/allanavelar)|
## Copyright and license
Code released under the [MIT License](./license.md).
Enjoy :metal: