mirror of
https://github.com/grafana/grafana.git
synced 2024-12-25 16:31:28 -06:00
build: removes gopkg files from dev docker file (#16817)
This commit is contained in:
parent
9b68952482
commit
fef3638018
@ -3,14 +3,10 @@ FROM golang:1.12.4
|
||||
|
||||
WORKDIR $GOPATH/src/github.com/grafana/grafana
|
||||
|
||||
COPY Gopkg.toml Gopkg.lock ./
|
||||
COPY go.mod go.sum ./
|
||||
COPY vendor vendor
|
||||
|
||||
ARG DEP_ENSURE=""
|
||||
RUN if [ ! -z "${DEP_ENSURE}" ]; then \
|
||||
go get -u github.com/golang/dep/cmd/dep && \
|
||||
dep ensure --vendor-only; \
|
||||
fi
|
||||
RUN go mod verify
|
||||
|
||||
COPY pkg pkg
|
||||
COPY build.go build.go
|
||||
|
@ -18,10 +18,21 @@ Upgrading Go or Node.js requires making changes in many different files. See bel
|
||||
|
||||
## Go Dependencies
|
||||
|
||||
Updated using `dep`.
|
||||
The Grafana project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.11 or greater installed.
|
||||
|
||||
- `Gopkg.toml`
|
||||
- `Gopkg.lock`
|
||||
All dependencies are vendored in the `vendor/` directory.
|
||||
|
||||
To add or update a new dependency, use the `go get` command:
|
||||
|
||||
```bash
|
||||
# Pick the latest tagged release.
|
||||
go get example.com/some/module/pkg
|
||||
|
||||
# Pick a specific version.
|
||||
go get example.com/some/module/pkg@vX.Y.Z
|
||||
```
|
||||
|
||||
Tidy up the `go.mod` and `go.sum` files and copy the new/updated dependency to the `vendor/` directory:
|
||||
|
||||
## Node.js Dependencies
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user