Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dockerhub automated build fails, "not a directory" when adding file

Tags:

dockerhub

I am trying to use docker hub to automatically build something that builds fine locally. It fails saying:

Build process failed: stat /var/lib/docker/aufs/mnt/1be9db483fa6f3de2596b5261e7c450de8df503185e579278396f14ba179c257/bin/run.sh: not a directory

You can view the build itself here: https://hub.docker.com/r/zbyte64/rethinkdb-tlsproxy/builds/bjclhq33kgwxxvn6nbfsgyh/

run.sh is in the same directory as Dockerfile, it seems the build path on dockerhub is different then where it stores the Dockerfile.

I have tried the following variations:

COPY run.sh /bin

ADD ./run.sh /bin

like image 771
zbyte Avatar asked Jan 29 '16 01:01

zbyte


1 Answers

The COPY command (on Dockerhub's Docker version) expects the target file on the right hand side, not just the target directory. The following command should work for you even on Dockerhub.

COPY run.sh /bin/run.sh
like image 70
buff Avatar answered Oct 12 '22 11:10

buff