CuriousTechie
CuriousTechie

Reputation: 421

Install latest Docker client through Dockerfile

I have included these steps in my Dockerfile inorder to setup latest Docker client on my container

RUN wget -P /tmp/ https://get.docker.com/builds/Linux/x86_64/docker-1.12.6.tgz && \
    tar -xvf /tmp/docker-1.12.6.tgz --directory /tmp/ && \
    mv /tmp/docker /usr/local/bin/docker

Want to make sure I got it right so I have entered into the container and did this

XX@XXXXXXXXXXXX:/$ docker
bash: docker: command not found
XX@XXXXXXXXXXXX:/$ docker version
bash: docker: command not found
XX@XXXXXXXXXXXX:/$
XX@XXXXXXXXXXXX:/$ which docker
XX@XXXXXXXXXXXX:/$

Not sure why that did not work. Please help! Thanks so much in advance.

Upvotes: 3

Views: 2008

Answers (1)

ichbinblau
ichbinblau

Reputation: 4819

You are supposed to copy the docker client binary to the /usr/local/bin rather than the entire uncompressed docker folder.
So the change should be: mv /tmp/docker/docker /usr/local/bin

Upvotes: 1

Related Questions