Watchtower: Internal Server Error: cannot mount volume over existing file

Created on 15 Mar 2016  路  5Comments  路  Source: containrrr/watchtower

Some of my containers can not be restarted by watchtower because of this error:

    level=error msg="500 Internal Server Error: cannot mount volume over existing file, file exists /var/lib/docker/aufs/mnt/...

In fact the container setup overwrites existing files in the images by creating one file volumes in docker-compose.yml:

  ...
  volumes:
    - '/opt/dockervolumes/wordpress/var_www_html:/var/www/html'
    - '/etc/localtime:/etc/localtime'
    - '/etc/timezone:/etc/timezone'

But this has never been a problem since I've been using it. docker and docker-compose are able to handle this well.

What's the difference about watchtower? How to fix this?

Thank you very much.

Awaiting user Bug

Most helpful comment

I now even tried to manually start the container by calling the docker api via command line:

echo -e "POST /v1.15/containers/f353778b264d16379018297cb714ae46b1489b9f98e80f321cde4f9fb7c6d199/start HTTP/1.0\r\n" | nc -U /var/run/docker.sock

This works smoothly. What does watchtower do differently? Environment?

All 5 comments

I now even tried to manually start the container by calling the docker api via command line:

echo -e "POST /v1.15/containers/f353778b264d16379018297cb714ae46b1489b9f98e80f321cde4f9fb7c6d199/start HTTP/1.0\r\n" | nc -U /var/run/docker.sock

This works smoothly. What does watchtower do differently? Environment?

In watchtower volumes are created when you create and start container. So I changed this to config.Volumes = map[string]struct{}{} and it worked for me. If you want to test dimag/watchtower.

Same problem here.

Are you still suffering from this problem? I haven't seen this problem so far with actual docker versions.

This is extremely old. Closing this as a lot has happened since. Let me know if the issue persists.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simskij picture simskij  路  5Comments

regystro picture regystro  路  5Comments

ghost picture ghost  路  4Comments

mlmnetcologne picture mlmnetcologne  路  3Comments

meandthedevil picture meandthedevil  路  6Comments