195c97501SAlex Bennée# Create Debian Bootstrap Image 295c97501SAlex Bennée# 395c97501SAlex Bennée# This is intended to be pre-poluated by: 495c97501SAlex Bennée# - a first stage debootstrap (see debian-bootstrap.pre) 595c97501SAlex Bennée# - a native qemu-$arch that binfmt_misc will run 695c97501SAlex BennéeFROM scratch 795c97501SAlex Bennée 895c97501SAlex Bennée# Add everything from the context into the container 995c97501SAlex BennéeADD . / 1095c97501SAlex Bennée 1195c97501SAlex Bennée# Patch all mounts as docker already has stuff set up 12*11cc24a1SAlex Bennée# (this is not needed for later debootstraps but is harmless atm) 1395c97501SAlex BennéeRUN sed -i 's/in_target mount/echo not for docker in_target mount/g' /debootstrap/functions 1495c97501SAlex Bennée 1595c97501SAlex Bennée# Run stage 2 1695c97501SAlex BennéeRUN /debootstrap/debootstrap --second-stage 1795c97501SAlex Bennée 1895c97501SAlex Bennée# At this point we can install additional packages if we want 1995c97501SAlex Bennée# Duplicate deb line as deb-src 2095c97501SAlex BennéeRUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list 21