Hey guys, I’ve invested some nerves and time into this.
The problem popped up when I was assembling a Docker image for the CI build process. One step was to download the Android SDK ZIP file from google, unzip/tar it and move it to /opt.
What I didn’t notice was that the tar command restored the uid and gids (it set them to 1000/1000 instead of root/root). After finding this out, I added a “chown -R root:root /opt” to the Dockerfile and the pull/build problem went away.
I’m not sure how this causes the problem in CircleCI, but having files set to the wrong uid/gid (possibly anything else than root) will confuse the spin up step as described in my initial post.
Here’s a Dockerfile snippet if someone at CircleCI feels like debugging it:
RUN cd /opt && wget -q https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz -O android-sdk.tgz
RUN cd /opt && tar -xvzf android-sdk.tgz
RUN cd /opt && rm -f android-sdk.tgz
RUN cd /opt \
&& wget -q https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz -O android-sdk.tgz \
&& tar -xvzf android-sdk.tgz \
&& rm -f android-sdk.tgz \
&& chown -R root:root /opt
If possible, I’d be curious/interested in some technical details in what is involved here so I can fully understand how this issue causes such a weird error and behavior during spinup.
Edit: Please note that this error seems to also appear (in a different form) when I use a simple vanilla docker setup and try to pull the affected image to a machine. Docker will pull a few of the images, then abort with an “authentication error” - which totally makes even less sense than what CircleCI says.
Hope that helps!