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

https://github.com/outeredge/dredger

Dredger is a docker tool to help automate local dev environments
https://github.com/outeredge/dredger

Last synced: 6 months ago
JSON representation

Dredger is a docker tool to help automate local dev environments

Awesome Lists containing this project

README

          

# dredger
Dredger is a docker tool to help automate local web development environments. It automatically starts a traefik proxy so you can run multiple environments at once with ease. No more remembering container hashes! Dredger also works with Eclipse Che.

By default, containers are made accessible at `http://{foldername}.localhost`. You can override this by adding a `HOST = ...` to a `Makefile.local` in your projects root (see [extending](#extending)), for example `http://mysite.192.168.1.100.xip.io`.

## Install
Run the command below to install dredger. Tested on Ubuntu 14.04, requires `make` and `netcat`.

`$ wget -qO- https://raw.githubusercontent.com/outeredge/dredger/master/install.sh | sudo bash`

## Upgrade
To upgrade dredger to the latest version, simply run `$ sudo dredger self-update` from your command line.

## Usage

See `$ dredger help`

```sh
Usage: dredger [command]

Commands:

build - Build the docker image
run - Run at http://{curdir}.*
bash - Enter running container with bash
status - Show the status of running container
logs - Show logs
restart - Restarts the running container
destroy - Stops the running container and deletes it
clean - Clean up all unused containers and images on this host
install - Run install scripts (i.e. composer)
```

#### Custom Arguments
To pass custom arguments to a command that supports it in the Makefile, simply append these to the end of the command like so:

`$ dredger run -e APPLICATION_ENV=staging`

## Extending

Add your own commands by creating a `Makefile.local` in your repositories root folder (i.e.):

```sh
HOST = {subdomain:[a-z]+}.$${DREDGER_NAME:-$(NAME).localhost}

.PHONY: test

help::
@echo ''
@echo 'Custom targets:'
@echo ''
@echo ' test - Run unit tests'

test:
@docker exec -i -t $(NAME) sudo -u www-data bash -c "phpunit --stop-on-failure"
```

## License
Distributed under the [MIT license](LICENSE)