Trying to install metasfresh docker on centos 7

@julian.bischof @metas-ts
Hi guys,

I am trying to install metashfresh docker on centos 7. My docker and docker-compose are running fine.
I know system requirement for normal metasfresh installation is Ubuntu 16.04 LTS (x86_64) but I thought as long as you can have docker and docker-compose on any machine running metashfresh should be fine.

I recieve the error below when i try to execute docker-compose up -d. Please let me know if you have any idea about how to fix this.

[root@hector metasfresh-docker]# docker-compose up -d
Creating metasfresh-docker_search_1 …
Creating metasfresh-docker_rabbitmq_1 …
Creating metasfresh-docker_db_1 … error

ERROR: for metasfresh-docker_db_1 Cannot start service db: b’OCI runtime create failed: container_linux.go:345: starting container process caused “process_linux.go:430: container init caused \“rootfs_linux.go:58: mounting \\\”/etc/timezone\\\” to rootfs \\\“/var/lib/docker/overlay2/c710d1abed5807414c3c445e37e305753d28d971658faec4b6adcafcbbd53d13/merged\\\” at \\\"/var/lib/docker/overlay2/c710d1abedCreating metasfresh-docker_rabbitmq_1 … error
e specified host path exists and is the expected type’

ERROR: for metasfresh-docker_rabbitmq_1 Cannot start service rabbitmq: b’OCI runtime create failed: container_linux.go:345: starting container process caused “process_linux.go:430: container init caused \“roCreating metasfresh-docker_search_1 … error
2/e2db4639dd3a6cc61521f87b822759900be45b9932ef3971fb4a2d6dfb266bff/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’

ERROR: for metasfresh-docker_search_1 Cannot start service search: b’OCI runtime create failed: container_linux.go:345: starting container process caused “process_linux.go:430: container init caused \“rootfs_linux.go:58: mounting \\\”/etc/timezone\\\” to rootfs \\\“/var/lib/docker/overlay2/76c90405dd0780c0f3eb42426b1d975c49343ece075adb5a998d85b6f4c0779f/merged\\\” at \\\“/var/lib/docker/overlay2/76c90405dd0780c0f3eb42426b1d975c49343ece075adb5a998d85b6f4c0779f/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’

ERROR: for db Cannot start service db: b’OCI runtime create failed: container_linux.go:345: starting container process caused “process_linux.go:430: container init caused \“rootfs_linux.go:58: mounting \\\”/etc/timezone\\\” to rootfs \\\“/var/lib/docker/overlay2/c710d1abed5807414c3c445e37e305753d28d971658faec4b6adcafcbbd53d13/merged\\\” at \\\“/var/lib/docker/overlay2/c710d1abed5807414c3c445e37e305753d28d971658faec4b6adcafcbbd53d13/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’

ERROR: for rabbitmq Cannot start service rabbitmq: b’OCI runtime create failed: container_linux.go:345: starting container process caused “process_linux.go:430: container init caused \“rootfs_linux.go:58: mounting \\\”/etc/timezone\\\” to rootfs \\\“/var/lib/docker/overlay2/e2db4639dd3a6cc61521f87b822759900be45b9932ef3971fb4a2d6dfb266bff/merged\\\” at \\\“/var/lib/docker/overlay2/e2db4639dd3a6cc61521f87b822759900be45b9932ef3971fb4a2d6dfb266bff/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’

ERROR: for search Cannot start service search: b’OCI runtime create failed: container_linux.go:345: starting container process caused “process_linux.go:430: container init caused \“rootfs_linux.go:58: mounting \\\”/etc/timezone\\\” to rootfs \\\“/var/lib/docker/overlay2/76c90405dd0780c0f3eb42426b1d975c49343ece075adb5a998d85b6f4c0779f/merged\\\” at \\\“/var/lib/docker/overlay2/76c90405dd0780c0f3eb42426b1d975c49343ece075adb5a998d85b6f4c0779f/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’
ERROR: Encountered errors while bringing up the project.
[root@hector metasfresh-docker]#

Thanks & Regards
Rajan Jain

hi,

afaik this part in docker compose file might not work on non Ubuntu Distributions:

    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro

@julian.bischof can you confirm ?

cheers,
Norbert

@rajan_jain

As @metasnw said - some volume-mounts are not available for all distributions.

In your case, it looks like /etc/timezone does not exist on the dockerhost.
You should be able to start your docker-compose project by commenting out/removing the lines containing /etc/timezone.

You can leave in /etc/localtime.

Cheers.

@metasnw @julian.bischof

Thanks a lot guys…
yeah I removed this /etc/timezone from docker-compose.yml and everything seems fine now.

Thanks