Different home directory during Docker build in Docker hub

I found a strange difference between building docker images in my main Ubuntu 14.04 machine and automatic Docker Hub builds.

This is my Docker file:

FROM buildpack-deps:wheezy-scm
RUN echo $HOME

This is the output in my car:

 ---> 2afbec25f6f6
Step 1 : RUN echo $HOME
 ---> Running in 6074455e13c0
/
 ---> 0cb1b6141f93
Removing intermediate container 6074455e13c0
Successfully built 0cb1b6141f93

And this comes from the Docker node:

---> 2afbec25f6f6
Step 1 : RUN echo $HOME
/root
---> 4c781d2d7d72
Successfully built 4c781d2d7d72

Pay attention to different directories HOME: /rootinstead /. Can someone explain to me what is going on?

This is my version of Docker (I installed the standard docker.ioUbuntu package ):

$ 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
+2
source share
1 answer

$HOME, Docker v1.0. Dockerfile, , $HOME=/root ( Docker v1.5.0). Docker Issue # 2968 .

+3

All Articles