Coder Social home page Coder Social logo

dockersh's Issues

scp / sftp

Do these work in dockersh? Scp would be really nice, sftp feels harder :)

Incompatible with newer libcontainer

Hello,

I am trying to compile dockersh myself and I am getting it fail at the go get step with the following output:

17:08 $ docker build  .
Sending build context to Docker daemon 304.1 kB
Sending build context to Docker daemon 
Step 0 : FROM google/golang:stable
 ---> 758475db4570
Step 1 : ENV GOPATH $GOPATH:/gopath/src/github.com/docker/libcontainer/vendor
 ---> Using cache
 ---> 3263d001eece
Step 2 : WORKDIR /gopath/src/github.com/Yelp/dockersh
 ---> Using cache
 ---> a88f8a2078ed
Step 3 : ADD . /gopath/src/github.com/Yelp/dockersh/
 ---> 1d30743dbd13
Removing intermediate container cee92864305e
Step 4 : RUN go get
 ---> Running in 5312afabc871
# github.com/Yelp/dockersh
./dockersh.go:134: undefined: "github.com/docker/libcontainer/user".GetUserGroupSupplementaryHome
./nsenter_linux_amd64.go:110: cleaner.Cleanup undefined (type map[string]string has no field or method Cleanup)
INFO[0029] The command [/bin/sh -c go get] returned a non-zero code: 2 

I do not know much about Go language, but I was able to figure out that the reason is this commit into docker/libcontainer.

I would like to use the dockersh in the boot2docker environment. I was able to pick up pre-built dockersh binary from the docker hub image, but it did not work (panic in dockerVersionCheck), but this is probably the different issue.

panic: Could not load container configuration

I set dockersh to a test user account, when I try to switch to that user, I got an error: "panic: Could not load container configuration: open /var/lib/docker/execdriver/native/c98e...61743/container.json: no such file or directory".
docker version is docker-ce v17.03. Is this a problem of version or I miss something?

include from code.google.com

line 8 of config.go references "code.google.com/p/gcfg" as an include ... however earlier in 2016 code.google.com was shutdown I attempted to switch it for "code.google.com/archive/p/gcfg" however this did not work.

The page references that the project has been migrated to "https://gopkg.in/gcfg.v1"

cannot find package "github.com/docker/docker/pkg/units"

ca@coeus:~/docker_scripts/dockersh$ docker build .
Sending build context to Docker daemon 289.8 kB
Step 1 : FROM google/golang:1.3
1.3: Pulling from google/golang
a3ed95caeb02: Pull complete
dc50bc165b2f: Pull complete
87097ad3dfb5: Pull complete
789e5cd8710f: Pull complete
780b54325802: Pull complete
Digest: sha256:ae6ce48168192eea01374512888f76b827c5d48b5b48c21834d9709f05320719
Status: Downloaded newer image for google/golang:1.3
---> 2aed3aed932b
Step 2 : ENV GOPATH $GOPATH:/gopath/src/github.com/docker/libcontainer/vendor
---> Running in ac137530032f
---> 2172935e3fea
Removing intermediate container ac137530032f
Step 3 : WORKDIR /gopath/src/github.com/Yelp/dockersh
---> Running in 565862617cb3
---> 98ee1e3c7cd1
Removing intermediate container 565862617cb3
Step 4 : ADD . /gopath/src/github.com/Yelp/dockersh/
---> 16678b27c77c
Removing intermediate container 7c41599e57be
Step 5 : RUN go get
---> Running in 2fe1748a95f6
package 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/go-units
imports 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:
/goroot/src/pkg/github.com/docker/docker/pkg/units (from $GOROOT)
/gopath/src/github.com/docker/docker/pkg/units (from $GOPATH)
/gopath/src/github.com/docker/libcontainer/vendor/src/github.com/docker/docker/pkg/units
package 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/go-units
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/pkg/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
The command '/bin/sh -c go get' returned a non-zero code: 1

possibly related to jwilder/docker-squash#28

Is this repo still active? Build failed

fresh ubuntu16.04 with docker correctly installed

$ docker build .
pull access denied for google/golang, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

have tried docker login and other solutions on the web without any success, then noticed that this project's last commit was 3 years ago with all travis checks failed. Seems like an inactive but not deprecated repo so just wanted to know if dockersh still works or are there any alternatives that provide the same function?

login shell on machines with multiple interactive users.
...
places user sessions into their own individual docker containers in a secure and locked down manner

/init: permission denied

hi,
I use ubuntu and I pull the image from docker:

docker pull yelp/dockersh

Then I run this:

docker run -v /usr/local/bin:/target yelp/dockersh

And I edit my /etc/dockersh file:

[dockersh]
imagename=busybox
shell=/bin/ash
usercwd=/

When I run "dockersh" as root:

$ dockersh
could not start container: exit status 1:
fc899bc0609f8549fce68c4fd9eadf677e6622a03af8b453d76b465e7860e55e
2014/09/01 15:43:34 Error response from daemon: Cannot start container fc899bc0609f8549fce68c4fd9eadf677e6622a03af8b453d76b465e7860e55e: exec: "/init": permission denied

It gave me the error above, is there I did something wrong? Thank you very much!

Add:
Here is my docker version information:
Client version: 1.2.0
Client API version: 1.14
Go version (client): go1.3.1
Git commit (client): fa7b24f
OS/Arch (client): linux/amd64
Server version: 1.2.0
Server API version: 1.14
Go version (server): go1.3.1

Build breaks: missing sys.UidMappings

Attempting to build from git:

$ sudo docker build .
Sending build context to Docker daemon 289.3 kB
Sending build context to Docker daemon 
Step 0 : FROM google/golang
Pulling repository google/golang
40320f7b3489: Download complete 
511136ea3c5a: Download complete 
3188629f3bf3: Download complete 
d8851364eca8: Download complete 
0f7fc680470c: Download complete 
40a64d46e672: Download complete 
d5f8db78a731: Download complete 
a029b1918d1a: Download complete 
1a5435622121: Download complete 
Status: Downloaded newer image for google/golang:latest
 ---> 40320f7b3489
Step 1 : ENV GOPATH $GOPATH:/gopath/src/github.com/docker/libcontainer/vendor
 ---> Running in f519e9a2e8b7
 ---> 777a0e39a914
Removing intermediate container f519e9a2e8b7
Step 2 : WORKDIR /gopath/src/github.com/Yelp/dockersh
 ---> Running in 504b11dd6672
 ---> 27d4c57144d6
Removing intermediate container 504b11dd6672
Step 3 : ADD . /gopath/src/github.com/Yelp/dockersh/
 ---> 96e8130f6f80
Removing intermediate container 4ee31a9e8c77
Step 4 : RUN go get
 ---> Running in dcbddd63a1e4
# github.com/docker/libcontainer/namespaces
../../docker/libcontainer/namespaces/exec.go:234: sys.UidMappings undefined (type *syscall.SysProcAttr has no field or method UidMappings)
../../docker/libcontainer/namespaces/exec.go:234: undefined: syscall.SysProcIDMap
../../docker/libcontainer/namespaces/exec.go:236: sys.UidMappings undefined (type *syscall.SysProcAttr has no field or method UidMappings)
../../docker/libcontainer/namespaces/exec.go:237: sys.UidMappings undefined (type *syscall.SysProcAttr has no field or method UidMappings)
../../docker/libcontainer/namespaces/exec.go:238: sys.UidMappings undefined (type *syscall.SysProcAttr has no field or method UidMappings)
../../docker/libcontainer/namespaces/exec.go:243: sys.GidMappings undefined (type *syscall.SysProcAttr has no field or method GidMappings)
../../docker/libcontainer/namespaces/exec.go:243: undefined: syscall.SysProcIDMap
../../docker/libcontainer/namespaces/exec.go:245: sys.GidMappings undefined (type *syscall.SysProcAttr has no field or method GidMappings)
../../docker/libcontainer/namespaces/exec.go:246: sys.GidMappings undefined (type *syscall.SysProcAttr has no field or method GidMappings)
../../docker/libcontainer/namespaces/exec.go:247: sys.GidMappings undefined (type *syscall.SysProcAttr has no field or method GidMappings)
../../docker/libcontainer/namespaces/exec.go:247: too many errors
INFO[0375] The command [/bin/sh -c go get] returned a non-zero code: 2 

Unable to build

When I build from cloning github repository I get:

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

No passwd entry

Hi, I followed the instruction, but when I login to a shell, I get:

docker: Error response from daemon: linux spec user: unable to find user dsh: no matching entries in passwd file.

I use Ubuntu 16.04, Docker version 1.12.6 and my /etc/dockersh is

[dockersh]
imagename = ubuntu:precise
shell = /bin/bash
mounthome

How to open a login shell?

Hey @bobtfish, I have the /bin/bash shell, but it's not doing the login. I get the shell, but .bashrc et all don't run. If I run directly with docker run -it --rm ubuntu:trusty /bin/bash it works.

I've tried this:

[dockersh]
imagename = phusion_%u
shell = /bin/bash
cmd = --login
dockeropt = --hostname="myhost"
mounthome

Seems like an interactive shell is being forced on. Is there any way to start a login shell?

Thanks.

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

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

Not working with docker-engine for centos

Hi, this looks like a great tool, but I cannot get it working with docker-engine for centos7.

I get:

panic: Could not load container configuration: open /var/lib/docker/execdriver/native/*/container.json: no such file or directory

(Where "*" is the container id).

It looks like I don't have a "execdriver" subdirectory under /var/lib/docker (or anywhere on my system) - is there a prerequisite, or has docker changed (I'm using 1.9.0) and thus this no longer works?

Build breaks: no buildable Go source files in /gopath/src/github.com/Yelp/dockersh

docker build .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon
Step 0 : FROM google/golang
---> 3cc1d7ae0e9c
Step 1 : ENV GOPATH $GOPATH:/gopath/src/github.com/docker/libcontainer/vendor
---> Using cache
---> daf544781010
Step 2 : WORKDIR /gopath/src/github.com/Yelp/dockersh
---> Using cache
---> feff3061b265
Step 3 : ADD . /gopath/src/github.com/Yelp/dockersh/
---> Using cache
---> 26ef3b958ad3
Step 4 : RUN go get
---> Running in 3694d8a25e36
can't load package: package github.com/Yelp/dockersh: no buildable Go source files in /gopath/src/github.com/Yelp/dockersh
INFO[0000] The command [/bin/sh -c go get] returned a non-zero code: 1

Unable to find image '/dev/null:/portforward:ro' locally

Hi, when I run dockersh I get this error:

could not start container: exit status 1:
Unable to find image '/dev/null:/portforward:ro' locally
2014/10/09 13:50:25 Invalid namespace name (), only [a-z0-9_] are allowed, size between 4 and 30

I'm running Ubuntu 14.04.1 LTS with:

Client version: 1.2.0
Client API version: 1.14
Go version (client): go1.3.1
Git commit (client): fa7b24f
OS/Arch (client): linux/amd64
Server version: 1.2.0
Server API version: 1.14
Go version (server): go1.3.1
Git commit (server): fa7b24f

Just installed dockersh from dockerhub.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.