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:
-
Create an empty floppy image of 1.44 MB as root:
$ /sbin/mkfs.msdos -C / 1440
-
Mount the directory:
$ sudo mount -o loop /path/imagefile.img /media/floppy1/
-
Copy the XML file to the mounted directory:
$ cp file.xml /media/floppy1
-
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.
Best Answer
In my docker-compose I added:
privileged: true
setting.