I’m playing with Docker in Docker and using a Pi 3 as the test device.
The Dockerfile.template is pretty simple
FROM resin/%%RESIN_MACHINE_NAME%%-debian:jessie # Let's start with some basic stuff. RUN apt-get update && apt-get install -yq --no-install-recommends \ apt-transport-https \ ca-certificates \ curl \ lxc \ iptables \ && apt-get clean && rm -rf /var/lib/apt/lists/ # Install Docker from hypriot repos RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 37BBEE3F7AD95B3F && \ echo "deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ wheezy main" > /etc/apt/sources.list.d/hypriot.list && \ apt-get update && apt-get install -yq --no-install-recommends \ docker-hypriot docker-compose \ && rm -rf /var/lib/apt/lists/ COPY ./wrapdocker /usr/local/bin/wrapdocker COPY ./apps /apps WORKDIR /apps # Define additional metadata for our image. VOLUME /var/lib/docker ADD start.sh /start.sh CMD ["bash", "start.sh"]
The image compiles OK, it downloads to the device, the device comes online, I see the logs scrolling and I can get in remotely using the terminal. However, when start.sh runs it does a
docker compose up
and at this point, I get errors saying that the docker index cannot be reached and everything stops.
Just as importantly, the device stops updating its image: i.e. if I update the dockerfile and push a new version, it gets rebuilt on resin.io but does not get downloaded to the device. The only solution is to delete the device and start afresh.
By installing some test tools I have established that the problem seems to be with name resolution. I can ping IP addresses but not dns names.
I’ve tried force pushing a different image and this works fine, so it’s not the network or the device hardware.
Any ideas of where to start looking?