Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when uncommenting msmtp in docker file: Are you trying to mount a directory onto a file (or vice-versa)? #248

Open
levasc opened this issue Nov 11, 2020 · 3 comments

Comments

@levasc
Copy link

levasc commented Nov 11, 2020

ERROR: for icinga2 Cannot start service icinga2: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused "rootfs_linux.go:58: mounting \"/home/mariuzz/Docker/icinga2/msmtp/aliases\" to rootfs \"/var/lib/docker/overlay2/4c48409cde020d21e3d5b1f7bc19dd617b05698c715538dc25825cd816857f62/merged\" at \"/var/lib/docker/overlay2/4c48409cde020d21e3d5b1f7bc19dd617b05698c715538dc25825cd816857f62/merged/etc/aliases\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

@jjethwa
Copy link
Owner

jjethwa commented Nov 11, 2020

Hi @levasc

Can you provide the docker run command? Just to make sure, the mount information is supplied here: https://github.com/jjethwa/icinga2#sending-notification-mails

@levasc
Copy link
Author

levasc commented Nov 11, 2020 via email

@jjethwa
Copy link
Owner

jjethwa commented Nov 11, 2020

Thanks @levasc

There is an issue with some versions of docker and docker-compose for volumes that are files. Try putting the exact path to the files on the host system: https://github.com/jjethwa/icinga2/blob/master/docker-compose.yml#L47-L48

For example:

/apps/docker-volumes/icinga2/msmtp/aliases:/etc/aliases:ro

Hopefully that works 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants