Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Ensure lock issue on docker #332

Closed
Closed
@alex88

Description

@alex88

I'm trying to fetch dependencies in a dockerfile to build the project

Locally on OSX it works fine, on docker with this dockerfile

FROM golang:1.8-alpine

# Package dependencies
RUN apk add --update --no-cache git libc-dev

# install dependency tool
RUN go get github.com/golang/dep && go install github.com/golang/dep/cmd/dep

# Copy project files
WORKDIR /go/src/github.com/prj/app
COPY . /go/src/github.com/prj/app

# Get dependencies
RUN dep ensure -v
# Compile code
RUN go build

RUN ["app"]

The ensure -v output is

Root project is "github.com/prj/app"
 1 transitively valid internal packages
 3 external packages imported from 1 projects
(0)   ✓ select (root)
(1)	? attempt k8s.io/client-go with 3 pkgs; at least 1 versions to try
(1)	    try k8s.io/client-go@v2.0.0
(1)	✓ select k8s.io/client-go@v2.0.0 w/110 pkgs
(2)	? attempt github.com/blang/semver with 1 pkgs; at least 1 versions to try
(2)	    try github.com/blang/semver@v3.5.0
(2)	✓ select github.com/blang/semver@v3.5.0 w/1 pkgs
(3)	? attempt github.com/emicklei/go-restful with 2 pkgs; at least 1 versions to try
(3)	    try github.com/emicklei/go-restful@v1.2
(3)	✓ select github.com/emicklei/go-restful@v1.2 w/3 pkgs
(4)	? attempt github.com/coreos/go-oidc with 3 pkgs; at least 1 versions to try
(4)	    try github.com/coreos/go-oidc@master
(4)	✓ select github.com/coreos/go-oidc@master w/5 pkgs
(5)	? attempt github.com/coreos/pkg with 2 pkgs; at least 1 versions to try
(5)	    try github.com/coreos/pkg@v3
(5)	✓ select github.com/coreos/pkg@v3 w/3 pkgs
(6)	? attempt github.com/ghodss/yaml with 1 pkgs; at least 1 versions to try
(6)	    try github.com/ghodss/yaml@master
(6)	✓ select github.com/ghodss/yaml@master w/1 pkgs
(7)	? attempt github.com/imdario/mergo with 1 pkgs; at least 1 versions to try
(7)	    try github.com/imdario/mergo@0.2.2
(7)	✓ select github.com/imdario/mergo@0.2.2 w/1 pkgs
(8)	? attempt github.com/gogo/protobuf with 2 pkgs; at least 1 versions to try
(8)	    try github.com/gogo/protobuf@v0.4
(8)	✓ select github.com/gogo/protobuf@v0.4 w/2 pkgs
(9)	? attempt github.com/juju/ratelimit with 1 pkgs; at least 1 versions to try
(9)	    try github.com/juju/ratelimit@master
(9)	✓ select github.com/juju/ratelimit@master w/1 pkgs
(10)  ? attempt github.com/go-openapi/spec with 1 pkgs; at least 1 versions to try
(10)      try github.com/go-openapi/spec@master
(10)  ✓ select github.com/go-openapi/spec@master w/1 pkgs
(11)  ? attempt github.com/go-openapi/jsonpointer with 1 pkgs; at least 1 versions to try
(11)      try github.com/go-openapi/jsonpointer@master
(11)  ✓ select github.com/go-openapi/jsonpointer@master w/1 pkgs
(12)  ? attempt github.com/davecgh/go-spew with 1 pkgs; at least 1 versions to try
(12)      try github.com/davecgh/go-spew@v1.1.0
(12)  ✓ select github.com/davecgh/go-spew@v1.1.0 w/1 pkgs
(13)  ? attempt github.com/go-openapi/jsonreference with 1 pkgs; at least 1 versions to try
(13)      try github.com/go-openapi/jsonreference@master
(13)  ✓ select github.com/go-openapi/jsonreference@master w/1 pkgs
(14)  ? attempt github.com/PuerkitoBio/purell with 1 pkgs; at least 1 versions to try
(14)      try github.com/PuerkitoBio/purell@v1.1.0
(14)  ✓ select github.com/PuerkitoBio/purell@v1.1.0 w/1 pkgs
(15)  ? attempt github.com/PuerkitoBio/urlesc with 1 pkgs; at least 1 versions to try
(15)      try github.com/PuerkitoBio/urlesc@master
(15)  ✓ select github.com/PuerkitoBio/urlesc@master w/1 pkgs
(16)  ? attempt github.com/go-openapi/swag with 1 pkgs; at least 1 versions to try
(16)      try github.com/go-openapi/swag@master
(16)  ✓ select github.com/go-openapi/swag@master w/1 pkgs
(17)  ? attempt github.com/mailru/easyjson with 2 pkgs; at least 1 versions to try
(17)      try github.com/mailru/easyjson@master
(17)  ✓ select github.com/mailru/easyjson@master w/3 pkgs
(18)  ? attempt golang.org/x/oauth2 with 2 pkgs; at least 1 versions to try
(18)      try golang.org/x/oauth2@master
(18)  ✓ select golang.org/x/oauth2@master w/5 pkgs
(19)  ? attempt cloud.google.com/go with 1 pkgs; at least 1 versions to try
(19)      try cloud.google.com/go@v0.7.0
(19)  ✓ select cloud.google.com/go@v0.7.0 w/2 pkgs
(20)  ? attempt github.com/docker/distribution with 1 pkgs; at least 1 versions to try
(20)      try github.com/docker/distribution@v2.6.0
(20)  ✓ select github.com/docker/distribution@v2.6.0 w/2 pkgs
(21)  ? attempt github.com/spf13/pflag with 1 pkgs; at least 1 versions to try
(21)      try github.com/spf13/pflag@master
(21)  ✓ select github.com/spf13/pflag@master w/1 pkgs
(22)  ? attempt github.com/googleapis/gax-go with 1 pkgs; at least 1 versions to try
(22)      try github.com/googleapis/gax-go@master
(22)  ✓ select github.com/googleapis/gax-go@master w/1 pkgs
(23)  ? attempt github.com/pborman/uuid with 1 pkgs; at least 1 versions to try
(23)      try github.com/pborman/uuid@v1.0
(23)  ✓ select github.com/pborman/uuid@v1.0 w/1 pkgs
(24)  ? attempt gopkg.in/inf.v0 with 1 pkgs; at least 1 versions to try
(24)      try gopkg.in/inf.v0@v0.9.0
(24)  ✓ select gopkg.in/inf.v0@v0.9.0 w/1 pkgs
(25)  ? attempt github.com/google/gofuzz with 1 pkgs; at least 1 versions to try
(25)      try github.com/google/gofuzz@master
(25)  ✓ select github.com/google/gofuzz@master w/1 pkgs
(26)  ? attempt golang.org/x/net with 2 pkgs; at least 1 versions to try
(26)      try golang.org/x/net@master
(26)  ✓ select golang.org/x/net@master w/5 pkgs
(27)  ? attempt github.com/golang/glog with 1 pkgs; at least 1 versions to try
(27)      try github.com/golang/glog@master
(27)  ✓ select github.com/golang/glog@master w/1 pkgs
(28)  ? attempt github.com/howeyc/gopass with 1 pkgs; at least 1 versions to try
(28)      try github.com/howeyc/gopass@master
(28)  ✓ select github.com/howeyc/gopass@master w/1 pkgs
(29)  ? revisit golang.org/x/net to add 1 pkgs
(29)    ✓ include 1 more pkgs from golang.org/x/net@master
(29)  ? attempt golang.org/x/crypto with 1 pkgs; at least 1 versions to try
(30)      try golang.org/x/crypto@master
(30)  ✓ select golang.org/x/crypto@master w/1 pkgs
(30)  ? attempt gopkg.in/yaml.v2 with 1 pkgs; at least 1 versions to try
(31)      try gopkg.in/yaml.v2@v2
(31)  ✓ select gopkg.in/yaml.v2@v2 w/1 pkgs
(31)  ? attempt golang.org/x/text with 2 pkgs; at least 1 versions to try
(32)      try golang.org/x/text@master
(32)  ✓ select golang.org/x/text@master w/7 pkgs
(32)  ? attempt github.com/jonboulle/clockwork with 1 pkgs; at least 1 versions to try
(33)      try github.com/jonboulle/clockwork@v0.1.0
(33)  ✓ select github.com/jonboulle/clockwork@v0.1.0 w/1 pkgs
(33)  ? attempt github.com/ugorji/go with 1 pkgs; at least 1 versions to try
(34)      try github.com/ugorji/go@master
(34)  ✓ select github.com/ugorji/go@master w/1 pkgs
(34)  ? revisit golang.org/x/net to add 1 pkgs
(35)    ✓ include 2 more pkgs from golang.org/x/net@master
(34)  ? attempt google.golang.org/grpc with 2 pkgs; at least 1 versions to try
(36)      try google.golang.org/grpc@v1.0.5
(36)  ✓ select google.golang.org/grpc@v1.0.5 w/11 pkgs
(35)  ? revisit golang.org/x/net to add 2 pkgs
(37)    ✓ include 4 more pkgs from golang.org/x/net@master
(35)  ? attempt github.com/golang/protobuf with 1 pkgs; at least 1 versions to try
(38)      try github.com/golang/protobuf@master
(38)  ✓ select github.com/golang/protobuf@master w/1 pkgs
(36)  ? attempt google.golang.org/appengine with 2 pkgs; at least 1 versions to try
(39)      try google.golang.org/appengine@v1.0.0
(39)  ✓ select google.golang.org/appengine@v1.0.0 w/10 pkgs
(37)  ? attempt golang.org/x/sys with 1 pkgs; at least 1 versions to try
(40)      try golang.org/x/sys@master
(40)  ✓ select golang.org/x/sys@master w/1 pkgs
  ✓ found solution with 195 packages from 37 projects

Solver wall times by segment:
         b-list-pkgs: 2m39.795790853s
     b-source-exists:   11.877625451s
  b-deduce-proj-root:    1.739862121s
              b-gmal:    241.959134ms
             satisfy:     26.345118ms
         select-atom:     25.092887ms
            new-atom:       2.40717ms
               other:        222.09µs
         select-root:        64.581µs
            add-atom:        14.396µs

  TOTAL: 2m53.709383801s

grouped write of manifest, lock and vendor: must provide a lock in order to write out vendor
The command '/bin/sh -c dep ensure -v' returned a non-zero code: 1

Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions