Skip to content

Commit

Permalink
prepare for replacing the shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenDowideit committed May 15, 2014
1 parent e54c055 commit c53ef89
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ VERSION := $(shell cat VERSION)
GITSHA1 := $(shell git rev-parse --short HEAD)
GOARCH := amd64
GOFLAGS := -ldflags "-X main.Version $(VERSION) -X main.GitSHA $(GITSHA1)"
PREFIX := boot2docker-cli
PREFIX := boot2docker
DOCKER_IMAGE := boot2docker-golang
DOCKER_CONTAINER := boot2docker-cli-build
DOCKER_SRC_PATH := /go/src/github.com/boot2docker/boot2docker-cli
Expand Down
35 changes: 13 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# boot2docker-cli

This is the Go port of the
[boot2docker](https://github.com/boot2docker/boot2docker) [management
script](https://github.com/boot2docker/boot2docker/blob/master/boot2docker). It
is intended to replace the shell script eventually. Currently the Go port is
usable but since it is under active development, frequent changes and bugs are
to be expected. USE AT YOUR OWN RISK.

## What it does
# boot2docker command line management tool

This tool downloads the boot2docker ISO image, creates a VirtualBox virtual
machine, sets up two networks for that virtual machine (one NAT to allow the VM
Expand All @@ -16,7 +7,7 @@ port mapping to work securely), and then provides the user a simple way to
login via SSH.

On Windows, [MSYS SSH](http://www.mingw.org/) provides a first class way to
connect to the boot2docker VM using `boot2docker-cli.exe ssh`.
connect to the boot2docker VM using `boot2docker.exe ssh`.


## Installation
Expand All @@ -35,7 +26,7 @@ You need to have [Go compiler](http://golang.org) installed, and `$GOPATH`
The binary will be available at `$GOPATH/bin/boot2docker-cli`. However the
binary built this way will have missing version information when you run

$ boot2docker-cli version
$ boot2docker version

You can solve the issue by using `make goinstall`

Expand Down Expand Up @@ -80,7 +71,7 @@ Currently the binary cross-compiled from Windows/Linux to OS X has a [TLS
issue](https://github.com/boot2docker/boot2docker-cli/issues/11), and as a
result

$ boot2docker-cli download
$ boot2docker download

will fail. You need to do a native OS X build to avoid this problem.

Expand All @@ -89,37 +80,37 @@ will fail. You need to do a native OS X build to avoid this problem.

To initialize a new boot2docker VM, run

$ boot2docker-cli init
$ boot2docker init

Then you can start the VM by

$ boot2docker-cli up
$ boot2docker up

To stop the VM, run

$ boot2docker-cli down
$ boot2docker down

And finally if you don't need the VM anymore, run

$ boot2docker-cli delete
$ boot2docker delete

to remove it completely.

You can also run commands on the remote boot2docker virtual machine:

$ boot2docker-cli -m 123 ssh ip addr show eth1 |sed -ne 's/^[ \t]*inet[ \t]*\([0-9.]\+\)\/.*$/\1/p'
$ boot2docker -m 123 ssh ip addr show eth1 |sed -ne 's/^[ \t]*inet[ \t]*\([0-9.]\+\)\/.*$/\1/p'
192.168.59.103

In this case, the command tells you the host only interface IP address of the
boot2docker vm, which you can then use to access ports you map from your containers.

## Configuration

The `boot2docker-cli` binary reads configuration from `$BOOT2DOCKER_PROFILE`, or
if not found, from `$BOOT2DOCKER_DIR/profile`. `./boot2docker-cli config` will
The `boot2docker` binary reads configuration from `$BOOT2DOCKER_PROFILE`, or
if not found, from `$BOOT2DOCKER_DIR/profile`. `boot2docker config` will
tell you where it is looking for the file, and will also output the settings that
are in use, so you can initialise a default file to customise using
`boot2docker-cli config > /home/sven/.boot2docker/profile`.
`boot2docker config > /home/sven/.boot2docker/profile`.

Currently you can configure the following options (undefined options take
default values):
Expand Down Expand Up @@ -174,7 +165,7 @@ upperip=192.168.59.254
```

You can override the configurations using matching command-line flags. Type
`boot2docker-cli -h` for more information. The configuration file options are
`boot2docker -h` for more information. The configuration file options are
the same as the command-line flags with long names.


Expand Down

0 comments on commit c53ef89

Please sign in to comment.