Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

Docker build fails with "cannot find package "github.com/docker/libcontainer/namespaces"" #19

Closed
zoobab opened this issue Sep 30, 2015 · 6 comments

Comments

@zoobab
Copy link

zoobab commented Sep 30, 2015

Just did a docker build and it fails:

Status: Downloaded newer image for google/golang:latest

Executing 1 build triggers

Trigger 0, RUN echo "This image is now deprecated. If you are not using Managed VMs, you should use the official Go Docker image located at: https://hub.docker.com/_/golang/"
Step 0 : RUN echo "This image is now deprecated. If you are not using Managed VMs, you should use the official Go Docker image located at: https://hub.docker.com/_/golang/"
---> Running in 345c351545f0
This image is now deprecated. If you are not using Managed VMs, you should use the official Go Docker image located at: https://hub.docker.com/_/golang/
---> cd06dfa999b2
Removing intermediate container 345c351545f0
Step 1 : ENV GOPATH $GOPATH:/gopath/src/github.com/docker/libcontainer/vendor
---> Running in 4135f0cd3420
---> c28876072e89
Removing intermediate container 4135f0cd3420
Step 2 : WORKDIR /gopath/src/github.com/Yelp/dockersh
---> Running in e5c6a7054302
---> 73daaaa72471
Removing intermediate container e5c6a7054302
Step 3 : ADD . /gopath/src/github.com/Yelp/dockersh/
---> 98dc8f30ccf8
Removing intermediate container a17661ea88d4
Step 4 : RUN go get
---> Running in ce829d744d14
package code.google.com/p/gcfg
imports github.com/coreos/go-namespaces/namespace
imports github.com/docker/libcontainer
imports github.com/docker/docker/pkg/mount
imports github.com/docker/docker/pkg/symlink
imports github.com/docker/docker/pkg/units
imports github.com/docker/libcontainer/user
imports github.com/docker/libcontainer/namespaces
imports github.com/docker/libcontainer/namespaces
imports github.com/docker/libcontainer/namespaces: cannot find package "github.com/docker/libcontainer/namespaces" in any of:
/goroot/src/github.com/docker/libcontainer/namespaces (from $GOROOT)
/gopath/src/github.com/docker/libcontainer/namespaces (from $GOPATH)
/gopath/src/github.com/docker/libcontainer/vendor/src/github.com/docker/libcontainer/namespaces
INFO[0158] The command [/bin/sh -c go get] returned a non-zero code: 1

@zoobab
Copy link
Author

zoobab commented Oct 13, 2015

github.com/docker/libcontainer/namespaces does not exists anymore.

What is the fix?

@ehsanmostajeran
Copy link

Hi, I also encounter similar problem.
Should it be changed to libcontainer under Runc repo.
How about other repos like github.com/docker/docker/pkg/units?

root@edge02:/home/oneadmin/dockersh# go get package code.google.com/p/gcfg: unable to detect version control system for code.google.com/ path package github.com/docker/docker/pkg/units imports github.com/docker/docker/pkg/units imports github.com/docker/docker/pkg/units: cannot find package "github.com/docker/docker/pkg/units" in any of: /root/.gvm/gos/go1.4.2/src/github.com/docker/docker/pkg/units (from $GOROOT) /root/.gvm/pkgsets/go1.4.2/global/src/github.com/docker/docker/pkg/units (from $GOPATH) package github.com/docker/docker/pkg/units imports github.com/docker/libcontainer/namespaces imports github.com/docker/libcontainer/namespaces imports github.com/docker/libcontainer/namespaces: cannot find package "github.com/docker/libcontainer/namespaces" in any of: /root/.gvm/gos/go1.4.2/src/github.com/docker/libcontainer/namespaces (from $GOROOT) /root/.gvm/pkgsets/go1.4.2/global/src/github.com/docker/libcontainer/namespaces (from $GOPATH)
When I try to build image from Dockerfile, I get this error.
Step 5 : RUN go get ---> Running in 3b0bf0c53414 package code.google.com/p/gcfg: unable to detect version control system for code.google.com/ path package github.com/docker/docker/pkg/units: cannot find package "github.com/docker/docker/pkg/units" in any of: /usr/local/go/src/github.com/docker/docker/pkg/units (from $GOROOT) /go/src/github.com/docker/docker/pkg/units (from $GOPATH) /go/src/app/_gopath/src/github.com/docker/docker/pkg/units /gopath/src/github.com/docker/libcontainer/vendor/src/github.com/docker/docker/pkg/units package github.com/docker/libcontainer/namespaces: cannot find package "github.com/docker/libcontainer/namespaces" in any of: /usr/local/go/src/github.com/docker/libcontainer/namespaces (from $GOROOT) /go/src/github.com/docker/libcontainer/namespaces (from $GOPATH) /go/src/app/_gopath/src/github.com/docker/libcontainer/namespaces /gopath/src/github.com/docker/libcontainer/vendor/src/github.com/docker/libcontainer/namespaces The command '/bin/sh -c go get' returned a non-zero code: 1

@caffeineaddiction
Copy link

I am seeing this issue as well. It looks like the problem is in nsenter_linux_amd64.go is this based on https://github.com/jpetazzo/nsenter ?

@dbech
Copy link

dbech commented Nov 17, 2016

I've noticed this also

[root@sir1 dockersh]# docker build . Sending build context to Docker daemon 290.3 kB Step 1 : FROM google/golang ---> 09ec5b5ecced Step 2 : ENV GOPATH $GOPATH:/gopath/src/github.com/docker/libcontainer/vendor ---> Using cache ---> e61c9ef5eefb Step 3 : WORKDIR /gopath/src/github.com/Yelp/dockersh ---> Using cache ---> cda1cdacf2f3 Step 4 : ADD . /gopath/src/github.com/Yelp/dockersh/ ---> Using cache ---> ecc03fc596c7 Step 5 : RUN go get ---> Running in 22c548099502 package github.com/docker/docker/pkg/units: cannot find package "github.com/docker/docker/pkg/units" in any of: /usr/local/go/src/github.com/docker/docker/pkg/units (from $GOROOT) /go/src/github.com/docker/docker/pkg/units (from $GOPATH) /go/src/app/_gopath/src/github.com/docker/docker/pkg/units /gopath/src/github.com/docker/libcontainer/vendor/src/github.com/docker/docker/pkg/units package github.com/docker/libcontainer/namespaces: cannot find package "github.com/docker/libcontainer/namespaces" in any of: /usr/local/go/src/github.com/docker/libcontainer/namespaces (from $GOROOT) /go/src/github.com/docker/libcontainer/namespaces (from $GOPATH) /go/src/app/_gopath/src/github.com/docker/libcontainer/namespaces /gopath/src/github.com/docker/libcontainer/vendor/src/github.com/docker/libcontainer/namespaces The command '/bin/sh -c go get' returned a non-zero code: 1

@triode3
Copy link

triode3 commented Jan 9, 2017

It seems that libcontainier was moved. From githubs libcontainer page: PROJECT MOVED TO RUNC https://github.com/opencontainers/runc

Further, it seems we can not jut use the new RUNC directly, and there are changes that will need to be made: https://github.com/opencontainers/runc/tree/master/libcontainer/nsenter

So far, both building with docker or go are failing. Adding the unit files in as per d17077b resolved 1/2 of the issues, but since libcontainer is now runC, it is stuck.

@solarkennedy
Copy link
Contributor

Sorry, but I'm closing this because we are archiving this project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants