An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          




Local Development Docker





language-used












## 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

[![Allan Avelar](https://avatars2.githubusercontent.com/u/6510417?v=3&s=128)](https://github.com/allanavelar) |
--- |
[▲▼ Allan Avelar ۞](https://github.com/allanavelar)|

## Copyright and license

Code released under the [MIT License](./license.md).

Enjoy :metal: