diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index b9c484cfa..925d5ebfb 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -16,10 +16,19 @@ FROM BASEIMAGE CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ -# install dumb-init from zesty -RUN clean-install \ - diffutils \ - dumb-init +RUN if grep -q -i "ports.ubuntu.com" /etc/apt/sources.list; \ +RUN clean-install \ + then \ + echo "deb http://ports.ubuntu.com/ubuntu-ports zesty universe" >> /etc/apt/sources.list; \ + else \ + echo "deb http://archive.ubuntu.com/ubuntu zesty universe" >> /etc/apt/sources.list; \ + fi \ + && DEBIAN_FRONTEND=noninteractive apt-get update \ + && apt-get install -y \ + diffutils \ + dumb-init \ + --no-install-recommends \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* ENTRYPOINT ["/usr/bin/dumb-init"]