undock
Dind for the lulz.
Last updated 2 years ago by pateketrueke .
MIT · Original npm · Tarball · package.json
$ cnpm install undock 
SYNC missed versions from official npm registry.

Dind for the lulz.

Useful single-shot command for Docker-in-Docker containers.

It will run $HOME/.docker/Dockerfile with some folders mounted:

  • /var/run/docker.sock
  • $HOME/.bash_history
  • $HOME/.gitconfig
  • $HOME/.ssh

See included Dockerfile as starting-point for your own setup.

Also you can check the published Dockerfile I'm using at Docker hub.

Usage

Install it globally with npm i -g undock or just use npx, e.g.

$ undock [NAME] [TARGET] [PROJECT] [NETWORK] [...] [-- COMMAND]

Options

  • -b, --build — Force image build before attaching
  • -p, --ports — Exposed ports from the attached container
  • NAME — Container name for the mounted image (default: none)
  • TARGET — Build target from the Dockerfile (default: develop)
  • PROJECT — Project name for the built image (default: basename $PWD)
  • NETWORK — Networking group used for linking containers (default: default)
  • -- COMMAND — Additional command to execute (default: /bin/bash)

Networking

Undock will setup the network for you based on given arguments.

However, if you can't see other containers remember connect them, e.g.

# start two containers in separated shells
$ undock web -p 80:4000 -- npm start
$ undock user -- npm start

# create a shared network and connect containers
$ docker network create -d bridge undock
$ docker network connect undock web
$ docker network connect undock user

Current Tags

  • 0.0.9                                ...           latest (2 years ago)

8 Versions

  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |