1*95c97501SAlex Bennée# Create Debian Bootstrap Image 2*95c97501SAlex Bennée# 3*95c97501SAlex Bennée# This is intended to be pre-poluated by: 4*95c97501SAlex Bennée# - a first stage debootstrap (see debian-bootstrap.pre) 5*95c97501SAlex Bennée# - a native qemu-$arch that binfmt_misc will run 6*95c97501SAlex BennéeFROM scratch 7*95c97501SAlex Bennée 8*95c97501SAlex Bennée# Add everything from the context into the container 9*95c97501SAlex BennéeADD . / 10*95c97501SAlex Bennée 11*95c97501SAlex Bennée# Patch all mounts as docker already has stuff set up 12*95c97501SAlex BennéeRUN sed -i 's/in_target mount/echo not for docker in_target mount/g' /debootstrap/functions 13*95c97501SAlex Bennée 14*95c97501SAlex Bennée# Run stage 2 15*95c97501SAlex BennéeRUN /debootstrap/debootstrap --second-stage 16*95c97501SAlex Bennée 17*95c97501SAlex Bennée# At this point we can install additional packages if we want 18*95c97501SAlex Bennée# Duplicate deb line as deb-src 19*95c97501SAlex BennéeRUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list 20*95c97501SAlex BennéeRUN apt-get update 21*95c97501SAlex BennéeRUN apt-get -y build-dep qemu 22