Skip to content

Commit e3756b2

Browse files
authored
Reworked Readme and added docu for the releases
1 parent 2c7194a commit e3756b2

File tree

1 file changed

+46
-29
lines changed

1 file changed

+46
-29
lines changed

README.md

Lines changed: 46 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,36 @@
99
You need to create a project-sepcific access token under `Access` > `API Tokens` in the project control panel
1010
and pass that to `docker-machine create` with the `--hetzner-api-token` option.
1111

12+
## Setup
1213

13-
## Building
14+
### Go
1415

15-
Use an up-to-date version of [go](https://golang.org/dl)
16+
Use an up-to-date version of [Go](https://golang.org/dl)
1617

1718
To use the driver, you can download the sources and build it locally:
1819

19-
# Get sources and build the binary at ~/go/bin/docker-machine-driver-hetzner
20-
go get github.com/jonasprogrammer/docker-machine-driver-hetzner
20+
```shell
21+
# Get sources and build the binary at ~/go/bin/docker-machine-driver-hetzner
22+
$ go get github.com/jonasprogrammer/docker-machine-driver-hetzner
2123

22-
# Make the binary accessible to docker-machine
23-
export GOPATH=$(go env GOPATH)
24-
export GOBIN=$GOPATH/bin
25-
export PATH="$PATH:$GOBIN"
24+
# Make the binary accessible to docker-machine
25+
$ export GOPATH=$(go env GOPATH)
26+
$ export GOBIN=$GOPATH/bin
27+
$ export PATH="$PATH:$GOBIN"
28+
```
29+
### Binary
2630

31+
You can find sources and pre-compiled binaries [here](https://github.com/JonasProgrammer/docker-machine-driver-hetzner/releases).
32+
33+
```shell
34+
# Download the binary (this example downloads the binary for linux amd64)
35+
$ wget https://github.com/JonasProgrammer/docker-machine-driver-hetzner/releases/download/0.2.4/docker-machine-driver-hetzner_0.2.4_linux_amd64.tar.gz
36+
$ tar -xvf docker-machine-driver-hetzner_0.2.4_linux_amd64.tar.gz
37+
38+
# Make it executable and copy the binary in a directory accessible with your $PATH
39+
$ chmod +x docker-machine-driver-hetzner
40+
$ cp docker-machine-driver-hetzner /usr/local/bin/
41+
```
2742

2843
## Usage
2944

@@ -86,24 +101,26 @@ was used during creation.
86101

87102
Fork this repository, yielding `github.com/<yourAccount>/docker-machine-driver-hetzner`.
88103

89-
# Get the sources of your fork and build it locally
90-
go get github.com/<yourAccount>/docker-machine-driver-hetzner
91-
92-
# * This integrates your fork into the $GOPATH (typically pointing at ~/go)
93-
# * Your sources are at $GOPATH/src/github.com/<yourAccount>/docker-machine-driver-hetzner
94-
# * That folder is a local Git repository. You can pull, commit and push from there.
95-
# * The binary will typically be at $GOPATH/bin/docker-machine-driver-hetzner
96-
# * In the source directory $GOPATH/src/github.com/<yourAccount>/docker-machine-driver-hetzner
97-
# you may use go get to re-build the binary.
98-
# * Note: when you build the driver from different repositories, e.g. from your fork
99-
# as well as github.com/jonasprogrammer/docker-machine-driver-hetzner,
100-
# the binary files generated by these builds are all called the same
101-
# and will hence override each other.
102-
103-
# Make the binary accessible to docker-machine
104-
export GOPATH=$(go env GOPATH)
105-
export GOBIN=$GOPATH/bin
106-
export PATH="$PATH:$GOBIN"
107-
108-
# Make docker-machine output help including hetzner-specific options
109-
docker-machine create --driver hetzner
104+
```shell
105+
# Get the sources of your fork and build it locally
106+
$ go get github.com/<yourAccount>/docker-machine-driver-hetzner
107+
108+
# * This integrates your fork into the $GOPATH (typically pointing at ~/go)
109+
# * Your sources are at $GOPATH/src/github.com/<yourAccount>/docker-machine-driver-hetzner
110+
# * That folder is a local Git repository. You can pull, commit and push from there.
111+
# * The binary will typically be at $GOPATH/bin/docker-machine-driver-hetzner
112+
# * In the source directory $GOPATH/src/github.com/<yourAccount>/docker-machine-driver-hetzner
113+
# you may use go get to re-build the binary.
114+
# * Note: when you build the driver from different repositories, e.g. from your fork
115+
# as well as github.com/jonasprogrammer/docker-machine-driver-hetzner,
116+
# the binary files generated by these builds are all called the same
117+
# and will hence override each other.
118+
119+
# Make the binary accessible to docker-machine
120+
$ export GOPATH=$(go env GOPATH)
121+
$ export GOBIN=$GOPATH/bin
122+
$ export PATH="$PATH:$GOBIN"
123+
124+
# Make docker-machine output help including hetzner-specific options
125+
$ docker-machine create --driver hetzner
126+
```

0 commit comments

Comments
 (0)