Skip to content

Commit becf2f2

Browse files
committed
Update local build instructions in README
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 6dfcfc1 commit becf2f2

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,42 @@ You can build the credential helpers using Docker:
1919
```shell
2020
# create builder
2121
$ docker buildx create --use
22+
2223
# build credential helpers from remote repository and output to ./bin/build
2324
$ docker buildx bake "https://github.com/docker/docker-credential-helpers.git"
25+
2426
# or from local source
2527
$ git clone https://github.com/docker/docker-credential-helpers.git
28+
$ cd docker-credential-helpers
2629
$ docker buildx bake
2730
```
2831

2932
Or if the toolchain is already installed on your machine:
3033

31-
1 - Download the source and put it in your `$GOPATH` with `go get`.
34+
1 - Download the source.
3235

33-
```
34-
$ go get github.com/docker/docker-credential-helpers
36+
```shell
37+
$ git clone https://github.com/docker/docker-credential-helpers.git
38+
$ cd docker-credential-helpers
3539
```
3640

3741
2 - Use `make` to build the program you want. That will leave an executable in the `bin` directory inside the repository.
3842

39-
```
40-
$ cd $GOPATH/docker/docker-credentials-helpers
43+
```shell
4144
$ make osxkeychain
4245
```
4346

4447
3 - Put that binary in your `$PATH`, so Docker can find it.
4548

49+
```shell
50+
$ cp bin/docker-credential-osxkeychain /usr/local/bin/
51+
```
52+
4653
## Usage
4754

4855
### With the Docker Engine
4956

50-
Set the `credsStore` option in your `.docker/config.json` file with the suffix of the program you want to use. For instance, set it to `osxkeychain` if you want to use `docker-credential-osxkeychain`.
57+
Set the `credsStore` option in your `~/.docker/config.json` file with the suffix of the program you want to use. For instance, set it to `osxkeychain` if you want to use `docker-credential-osxkeychain`.
5158

5259
```json
5360
{
@@ -91,8 +98,8 @@ A credential helper can be any program that can read values from the standard in
9198

9299
This repository also includes libraries to implement new credentials programs in Go. Adding a new helper program is pretty easy. You can see how the OS X keychain helper works in the [osxkeychain](osxkeychain) directory.
93100

94-
1. Implement the interface `credentials.Helper` in `YOUR_PACKAGE/YOUR_PACKAGE_$GOOS.go`
95-
2. Create a main program in `YOUR_PACKAGE/cmd/main_$GOOS.go`.
101+
1. Implement the interface `credentials.Helper` in `YOUR_PACKAGE/`
102+
2. Create a main program in `YOUR_PACKAGE/cmd/`.
96103
3. Add make tasks to build your program and run tests.
97104

98105
## License

0 commit comments

Comments
 (0)