I'm trying to migrate my existing application to Docker, it mounts an image but is getting an error:

 mount failed: Unknown error -1

These are the steps:

  1. Create an empty floppy image of 1.44 MB as root:

    $ /sbin/mkfs.msdos -C / 1440

  2. Mount the directory:

    $ sudo mount -o loop /path/imagefile.img /media/floppy1/

  3. Copy the XML file to the mounted directory:

    $ cp file.xml /media/floppy1

  4. Unmount the directory:

    $ umount /media/floppy1

I installed utilities to run mkfs.msdos, when I run mount command I get the following error:

[2016-05-03 05:49:53,631: DEBUG/Worker-7] [chan 0] EOF received (0)
[2016-05-03 05:49:53,632: ERROR/Worker-7] general.send_command() stderr: [u'mount: /media/floppy1: mount failed: Unknown error -1\n']

- /usr/local/src/containers/application/volumes/log/application_1/media/:/media/floppy1

In my Dockerfile:

RUN mkdir -p /media/floppy1
VOLUME ["/media/floppy1"]

This link suggest is not supported.


In my docker-compose I added:

privileged: true setting.

  • Worked for me as well. Running with docker run --privileged fixes the problem. – Luca Carlon Aug 26 '17 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.