Docker base image

How can I create a whole system base image with installed packages on docker?

FROM scratch

use above in your docker file.