Skip to content

Commit 3e22f06

Browse files
authored
Merge pull request #122 from PureStorage-OpenConnect/120-add-vendor-directory-to-manage-deps
Correct Dockerfile to use mod=readonly
2 parents 726300b + 67445a2 commit 3e22f06

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Binary downloads of the exporter can be found on the [Releases](https://github.c
4444

4545
The following commands describe how to run a typical build :
4646
```shell
47-
4847
# clone the repository
4948
git clone [email protected]:PureStorage-OpenConnect/pure-fa-openmetrics-exporter.git
5049

@@ -54,7 +53,13 @@ cd pure-fa-openmetrics-exporter
5453
make build .
5554
```
5655

57-
The newly built exporter executable can be found in the <kbd>./out/bin</kbd> directory.
56+
The newly built exporter binary can be found in the <kbd>./out/bin</kbd> directory.
57+
58+
Optionally, to build the binary with the vendor cache, you may use
59+
60+
````
61+
make build-with-vendor
62+
````
5863

5964
### Docker Image
6065

build/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ COPY go.mod go.sum ./
88
RUN go mod download && go mod verify
99

1010
COPY . .
11-
RUN CGO_ENABLED=1 go build -a -tags 'netgo osusergo static_build' -ldflags="-X main.version=v$VERSION" -v -o /usr/local/bin/pure-fa-om-exporter cmd/fa-om-exporter/main.go
11+
RUN CGO_ENABLED=1 go build -mod=readonly -a -tags 'netgo osusergo static_build' -ldflags="-X main.version=v$VERSION" -v -o /usr/local/bin/pure-fa-om-exporter cmd/fa-om-exporter/main.go
1212

1313

1414
# alpine is used here as it seems to be the minimal image that passes quay.io vulnerability scan

0 commit comments

Comments
 (0)