2

Basically, I'm getting this error when I try to create my containers:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:337: starting container process caused "process_linux.go:403: container init caused \"rootfs_linux.go:58: mounting \\\"/etc/timezone\\\" to rootfs \\\"/var/lib/docker/overlay2/8864cea6615c7c165fce558661bf297c43ebf90f4de534ca9c9bd38f7af8b487/merged\\\" at \\\"/var/lib/docker/overlay2/8864cea6615c7c165fce558661bf297c43ebf90f4de534ca9c9bd38f7af8b487/merged/etc/timezone\\\" 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.

No Idea why this is happening. It was working perfectly on Manjaro, but not working on Arch Labs.

Codebling
  • 10,764
  • 2
  • 38
  • 66
Turab
  • 134
  • 1
  • 14
  • Can you Update your question with Dockerfile and docker run command that you are performing. For a better understanding of your project. – Reza Torkaman Ahmadi Dec 07 '18 at 06:26
  • 1
    By the way, It seems like a duplicate of [this link](https://stackoverflow.com/questions/45972812/are-you-trying-to-mount-a-directory-onto-a-file-or-vice-versa) – Reza Torkaman Ahmadi Dec 07 '18 at 06:29

1 Answers1

4

The image used expects a directory at /etc/timezone that is not used on Arch Linux.

Expected /etc/timezone contents example:

Etc/UTC

Simply remove that bind mount from your command or docker-compose file. You need to set the timezone at in the container differently or find a way to keep the /etc/timezone file in sync with /etc/localtime.

/etc/timezone is a Solaris and Debian thing, I guess. It expects the timezone as a pair

Europe/Zürich
Jonathan Komar
  • 2,678
  • 4
  • 32
  • 43