5

I have ubuntu 14.04 and it is missing docker exec

sudo docker exec -it ubuntu_bash bash

I wish to run interactive bash shell in existing running docker container.

sudo docker version
Client version: 1.0.1
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 990021a
Server version: 1.0.1
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 990021a

3 Answers 3

9

Update docker on host.

docker exec was introduced on docker 1.3.0

Sign up to request clarification or add additional context in comments.

Comments

5

Updating docker with

apt-get update
apt-get install docker.io 

didn't help on my system, as the ubuntu packges are quite old.

I have used

curl -sSL https://get.docker.com/ubuntu/ | sudo sh

(as describe here: http://docs.docker.com/installation/ubuntulinux/#docker-maintained-package-installation)

and got this update

docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8
OS/Arch (client): linux/amd64
Server version: 1.4.1
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 5bc2ff8

Comments

0

The Long Term Support does not go past version 1.0.x. To get newer releases, tie directly to the PPA for docker by using a channel with updates. The new package will be called lxc-docker.

Copying from the article, I get

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get remove docker.io
sudo apt-get autoremove
sudo apt-get install lxc-docker

I removed my docker.io package and any leftovers before installing the newer release to avoid uncaught conflicts. Here's what I got when it was done.

$ docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d
OS/Arch (server): linux/amd64

and

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.