Git Product home page Git Product logo

dockme's Introduction

Archived

This was fun endevor, but docker-compose is now good enough, with a few shell funtions to make this unnecessary.

dockme

Simple docker wrapper for quickly spooling up containerized development environments.

jmervine@home testapp $ dockme -T nodebox --hostname testapp --save --sudo
2015/04/25 17:52:44 Wrote Dockme.yml
+ sudo docker run --name=nodeboxdev --hostname=testapp --workdir=/src --rm --tty --interactive --volume=/home/jmervine/Development/testapp:/src jmervine/nodebox:latest bash
[sudo] password for jmervine:

bash-4.3# node index.js
test app

bash-4.3# exit
exit

jmervine@home testapp $ dockme
+ sudo docker run --name=nodeboxdev --hostname=testapp --workdir=/src --rm --tty --interactive --volume=/home/jmervine/Development/testapp:/src jmervine/nodebox:latest bash

bash-4.3# node index.js
test app

Install

Install Docker, of course

# versioned
go get gopkg.in/jmervine/dockme.v1
cd $(go env GOPATH)/src/gopkg.in/jmervine/dockme.v1
make install

# from github
go get github.com/jmervine/dockme

Or see binaries in the builds directory.

Usage

NAME:
    Dockme - Simple wrapper for quickly spooling up docker containers for development.

USAGE:
    Dockme [arguments...] [command]

VERSION:
    0.3.3

AUTHOR:
    Joshua Mervine

OPTIONS:
    Only custom options or options whose usage strays from dockers
    usage have help messages. All other options map directly to docker
    run options, see Docker help and documentation for details.

    --template, -T 		set docker image template, see TEMPLATES below
    --image, -i 		set docker image [required]
    --source, -s 		local source directory
    --destination, -d 		[/src] container source directory
    --publish, -p 		list of ports to publish
    --workdir, -w 		set container workdir
    --dryrun, -D		show docker command to be run
    --save, -S			save configuration to file
    --config, -C "Dockme.yml"	conifguration file path
    --expose, -E 		list of ports to expose
    --env, -e 			list of environments
    --env-file			list of environment files
    --link, -l 			list of links
    --volume, -V 		list of volume mounts
    --volumes-from 		list of containers to mount volumes from
    --name, -n
    --sudo			run Docker with sudo
    --rm, -r
    --no-rm, -k
    --interactive, -I
    --no-interactive, -x
    --tty, -t
    --no-tty, -N
    --entrypoint
    --user
    --hostname, -H
    --domainname
    --mac-address
    --cpuset
    --memory
    --memory-swap
    --help, -h			show help
    --version, -v		print the version

TEMPLATES:
    nodebox    nodebox template w/ 'jmervine/nodebox:latest'
    ruby       ruby template w/ 'jmervine/herokudev-ruby:latest'
    rails      rails template w/ 'jmervine/herokudev-rails:latest'
    node       node template w/ 'jmervine/herokudev-node:latest'
    python2    python template w/ 'python:2-slim'
    python3    python template w/ 'python:3-slim'
    help       Shows a list of commands or help for one command

dockme's People

Contributors

jmervine avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

jdorfman

dockme's Issues

Add support for Dockmeinit.*

It would be cool if dockme could auto-detect that (a) no command was passed and (b) that a Dockmeinit.* file is present and if so, automatically use <ext match> Dockmeinit.<ext> as command.

  • Detect Dockmeinit.* present and no command value is set.
  • Map extension .rb to ruby
  • Map extension .sh to sh
  • Map extension .bash to bash
  • Map extension .py to python
  • Map extension .pl to perl
  • Map extension .js to node
  • Map extension .zsh to zsh
  • Map extension .go to golang
  • Map extension .<unknown>, if not executable, to error, else attempt to execute.

TODO List

  • Linking support.
  • --entrypoint support.
  • Support passed config file argument, possibly requires a refactor.
  • Extend test cases.
  • Start building a collection of common configurations.
  • Consider removing requirement for locally mounted directory -- my concern with this is it then starts overlapping with docker-compose (aka fig)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.