I've created a dockerfile to take an official php/apache image, add a bunch of dependencies and clone a GitHub repo, which works great when building a container image locally, but fails when I push it to GitHub and trigger an automated build at Docker Hub.
The command which fails is the git clone
RUN git clone git://github.com/symphonycms/symphony-2.git /var/www/html
and the reason for failure (according to Git) is
Step 5 : RUN git clone git://github.com/symphonycms/symphony-2.git /var/www/html && git checkout --track origin/bundle && git submodule update --init --recursive && git clone git://github.com/symphonycms/workspace.git && chown -R www-data:www-data *
[91mfatal: destination path '/var/www/html' already exists and is not an empty directory.
Can someone explain why there is no problem building locally but a failure at the hub?