Docker Community Forums

Share and learn in the Docker community.

Git submodules not correctly initialized in docker cloud

in our Dockerfile we have a RUN git submodule update --init --recursive.

This runs fine locally, but fails on Docker Cloud.

You can try it out yourself:

  1. clone github -> open62541 -> open62541 (sorry, can not put direct link here, new users can only post max 2 links…)
  2. Run cd open62541 && docker build .
  3. Success

On Docker Cloud this fails with:

fatal: not a git repository: /src/b6tohshrfzzntavvhek3zna/.git/modules/deps/mdnsd

Here is the last successful build:
(This one did not build correctly locally).

And after adding submodule initialization (See github -> open62541 -> pull #3191) it fails:

How can I fix this in a correct way?


I posted the same question on StackOverflow since I did not get any answers here.

Please continue the discussion on StackOverflow: