Docker Community Forums

Share and learn in the Docker community.

Git submodules not correctly initialized in docker cloud

Hi,
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:
https://cloud.docker.com/u/open62541/repository/registry-1.docker.io/open62541/open62541/builds/dcd3283c-76af-4f6b-bb00-cecbaaffc82f
(This one did not build correctly locally).

And after adding submodule initialization (See github -> open62541 -> pull #3191) it fails:
https://cloud.docker.com/u/open62541/repository/registry-1.docker.io/open62541/open62541/builds/28663705-c324-4c7f-a084-f94eb80057bc

How can I fix this in a correct way?

Thanks!

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

Please continue the discussion on StackOverflow: