Docker in docker (or is it) issue

Apologies if posted in wrong place, new to Docker.

I am trying to build a Yocto distribution involving the use of a Docker in Docker container. As part as the build a Dockerfile is processed using docker build (FROM docker:dind is the first line) which contains a an instruction of the form apk update. Cutting a long story short, what happens is the apk command does not see the internet and as such fails. I’m running on Ubuntu (14.04 LTS and 16.06 LTS). Can anybody give me a clue as to what is wrong.

I am sorry I couldn’t understand what you mean by apk update. Can you explain that?