The code snippet below shows how to create, format and mount a 1.44MB floppy disk image file, and then write files into it.

$ dd bs=512 count=2880 if=/dev/zero of=floppy.img
$ sudo mkfs.msdos floppy.img
$ sudo mount -o loop image.img /media/floppy/
$ cp ./files/* /media/floppy
$ sudo umount /media/floppy/