File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,47 @@ Create Docker machines on [Hetzner Cloud](https://docs.hetzner.cloud/).
99You need to create a project-sepcific access token under ` Access ` > ` API Tokens ` in the project control panel
1010and pass that to ` docker-machine create ` with the ` --hetzner-api-token ` option.
1111
12+ ## Building
13+
14+ Use an up-to-date version of [ go] ( https://golang.org/dl )
15+
16+ ### For use
17+
18+ To use the driver, you can download the sources and build it locally:
19+
20+ ```
21+ # Tell GO where to find sources and where to put binaries (see also https://github.com/golang/go/wiki/SettingGOPATH)
22+ export GOPATH="$(pwd)"
23+ export GOBIN=$GOPATH/bin
24+ # Build the binary
25+ go get github.com/jonasprogrammer/docker-machine-driver-hetzner
26+ # Make the binary accessible to docker-machine
27+ export PATH="$PATH:$GOBIN"
28+ # Make docker-machine output help including hetzner-specific options
29+ docker-machine create --driver hetzner
30+ ```
31+
32+ ### For development
33+
34+ To compile the local sources, do the following:
35+
36+ ```
37+ # Check out sources
38+ git clone https://github.com/JonasProgrammer/docker-machine-driver-hetzner.git
39+ # Tell GO where to find sources and where to put binaries (see also https://github.com/golang/go/wiki/SettingGOPATH)
40+ export GOPATH="$(pwd)"
41+ export GOBIN=$GOPATH/bin
42+ # Build the binary
43+ go get
44+ # Make the binary accessible to docker-machine
45+ export PATH="$PATH:$GOBIN"
46+ # Make docker-machine output help including hetzner-specific options
47+ docker-machine create --driver hetzner
48+ ```
49+ TODO: restructure code
50+ TODO: Go version
51+ TODO: set $GOPATH
52+
1253## Usage
1354
1455 $ docker-machine create --driver hetzner --hetzner-api-token=QJhoRT38JfAUO037PWJ5Zt9iAABIxdxdh4gPqNkUGKIrUMd6I3cPIsfKozI513sy some-machine
You can’t perform that action at this time.
0 commit comments