FROM scratch
Many containers only contain a single binary
No shell, no tools
Dump root partition content into container
–
FROM scratch
Container with image FROM scratch:
docker run -d --name traefik traefik:v1.7
Create local rootfs:
mkdir rootfs
docker create --name alpine alpine
docker cp alpine:/ rootfs
Copy into container:
rm rootfs/etc/hosts rootfs/etc/hostname rootfs/etc/resolv.conf
cd rootfs && docker cp . traefik:/ && cd ..
Enter container:
docker exec -it traefik /bin/sh