You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
What version of Go (go version) and dep (git describe --tags) are you using?
Go: 1.8.3
Dep: v0.2.1-6-gc1aba4d
What dep command did you run?
I would like to use dep inside a build container. I also have vendor/ set up by dep in the project root and there's also no entry in the .dockerignore-file preventing the directory to be passed to the "Docker"-daemon. Those are the example Dockerfiles for the build environment.
Naive approach
FROM golang:1.8-alpine
RUN go get -u github.com/golang/dep/cmd/dep
WORKDIR /go/src/github.com/example/project
COPY . .
RUN dep ensure
RUN make
The problem here is, that dep ensure is needed to run every time, when there are code changes to . which takes around 10 mins. Even using a caching HTTP proxy will only help to reduce that costs for the infrastructure where the proxy is enrolled.
Better approach - which fails
FROM golang:1.8-alpine
RUN go get -u github.com/golang/dep/cmd/dep
WORKDIR /go/src/github.com/example/project
COPY Gopkg.* ./
RUN dep ensure
COPY . .
RUN dep ensure
RUN make
This fails with all dirs lacked any go code. You see this kind of pattern in Ruby-applications to speed up the docker build. This makes use of "Docker"'s inbuild caching mechanism. Adding a more or less empty main.go does not help either.
What did you expect to see?
Install packages without any error
What did you see instead?
all dirs lacked any go code
The text was updated successfully, but these errors were encountered:
What version of Go (
go version
) anddep
(git describe --tags
) are you using?What
dep
command did you run?I would like to use
dep
inside a build container. I also havevendor/
set up bydep
in the project root and there's also no entry in the.dockerignore
-file preventing the directory to be passed to the "Docker"-daemon. Those are the example Dockerfiles for the build environment.Naive approach
The problem here is, that
dep ensure
is needed to run every time, when there are code changes to.
which takes around 10 mins. Even using a caching HTTP proxy will only help to reduce that costs for the infrastructure where the proxy is enrolled.Better approach - which fails
This fails with
all dirs lacked any go code
. You see this kind of pattern inRuby
-applications to speed up the docker build. This makes use of "Docker"'s inbuild caching mechanism. Adding a more or less emptymain.go
does not help either.What did you expect to see?
Install packages without any error
What did you see instead?
The text was updated successfully, but these errors were encountered: