# Docker Install on Mac (Sierra)

**URL:** <https://forum.metasfresh.org/t/docker-install-on-mac-sierra/591>\
**Category:** Setup\
**Created:** [August 17, 2017, 7:40pm UTC](https://forum.metasfresh.org/t/docker-install-on-mac-sierra/591 "2017-08-17T19:40:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chuck\_Boecking](https://forum.metasfresh.org/letter_avatar_proxy/v4/letter/c/8797f3/32.png) [@Chuck\_Boecking](https://forum.metasfresh.org/u/Chuck_Boecking)\
**Post date:** [August 17, 2017, 7:40pm UTC](https://forum.metasfresh.org/t/docker-install-on-mac-sierra/591/1 "2017-08-17T19:40:36Z")

</div>

Hi Everyone,

I am installing metasfresh for the first time using Docker on a Mac. I am receiving an error after the “docker-compose up -d” command. The error states that /etc/timezone is not shared. On a mac, there is no /etc/timezone file (unlike ubuntu). Can someone share insight how to fix? Thanks!!

FYI - I am new to docker.  
FYI - As a result of the below errors, “docker ps” shows nothing.

Docker Version:  
Version 17.06.0-ce-mac19 (18663)  
Channel: stable  
c98c1c25e0

Thank you for your time and consideration!

Here are the error details:  
ERROR: for metasfreshdocker\_db\_1 Cannot start service db: Mounts denied:  
The path /etc/timezone  
is not shared from OS X and is not known to Docker.  
You can configure shared paths from Docker -\> Preferences… -\> File Sharing.  
See [https://docs.docker.com/docker-for-mac/osxfs/#namespaces](https://docs.docker.com/docker-for-mac/osxfs/#namespaces) for more info.  
.  
Starting metasfreshdocker\_search\_1 … error  
ERROR: for metasfreshdocker\_search\_1 Cannot start service search: Mounts denied:  
The path /etc/timezone  
is not shared from OS X and is not known to Docker.  
You can configure shared paths from Docker -\> Preferences… -\> File Sharing.  
See [https://docs.docker.com/docker-for-mac/osxfs/#namespaces](https://docs.docker.com/docker-for-mac/osxfs/#namespaces) for more info.  
.

```
ERROR: for search Cannot start service search: Mounts denied: 
The path /etc/timezone
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.

```

…

---

<div class="post-metadata">

**Author:** ![metasnw](https://forum.metasfresh.org/user_avatar/forum.metasfresh.org/metasnw/32/23_2.png) [@metasnw](https://forum.metasfresh.org/u/metasnw)\
**Post date:** [August 22, 2017, 6:10am UTC](https://forum.metasfresh.org/t/docker-install-on-mac-sierra/591/2 "2017-08-22T06:10:39Z")

</div>

Hi Chuck,

you can remove the volume for /etc/timezone from the docker-compose.yml to fix that.  
Its there for Linux servers. I think we need to prepare a special Mac Docker-compose.yml.  
@julian.bischof What do you think?

Kind regards,  
Norbert

---

<div class="post-metadata">

**Author:** ![julian.bischof](https://forum.metasfresh.org/user_avatar/forum.metasfresh.org/julian.bischof/32/36_2.png) [@julian.bischof](https://forum.metasfresh.org/u/julian.bischof)\
**Post date:** [August 22, 2017, 6:50am UTC](https://forum.metasfresh.org/t/docker-install-on-mac-sierra/591/3 "2017-08-22T06:50:02Z")

</div>

Hey @Chuck_Boecking ,

as Norbert suggested you should be able to create a running metasfresh-docker stack without using the mount “timezone”.

You just need to open the `metasfresh-docker/docker-compose.yml` file and remove the lines containing `- /etc/timezone:/etc/timezone:ro`. Using a default metasfresh-docker stack, there should be 5 of these lines throughout the file - for each container-definition one.

Keep in mind to completely remove the line so there’s no empty line, else `docker-compose` might complain about an invalid yml file.

After modifiying, the entries should look similar to this:

```
db:
  build: db
  restart: always
  volumes:
    - ./volumes/db/data:/var/lib/postgresql/data
    - ./volumes/db/log:/var/log/postgresql
    - /etc/localtime:/etc/localtime:ro
  environment:
...

```

However, please also keep in mind to check if date-settings in metasfresh are correct after you ran the modified docker-compose file.  
You can check the date by using the command:  
`docker exec -it metasfreshdocker_app_1 date`  
The output of that command should be the same as your local time.

We did not test the metasfresh-docker stack on iOS so please let us know if anything works out for you 🙂

Kindly,  
Julian

---

<div class="post-metadata">

**Author:** ![pejas](https://forum.metasfresh.org/user_avatar/forum.metasfresh.org/pejas/32/548_2.png) [@pejas](https://forum.metasfresh.org/u/pejas)\
**Post date:** [August 30, 2017, 12:07pm UTC](https://forum.metasfresh.org/t/docker-install-on-mac-sierra/591/4 "2017-08-30T12:07:28Z")

</div>

Hi all,  
Same thing happens on fresh install of CentOS7 (updated to latest). Workaround works - comment out timezone lines from docker-compose.yml.

Info about this system:

```
docker --version
Docker version 17.06.1-ce, build 874a737

uname -a
Linux metafresh 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 

docker-compose --version
docker-compose version 1.15.0, build e12f3b9

LC_ALL=C date
Wed Aug 30 13:59:18 CEST 2017

docker exec -it metasfreshdocker_app_1 date
Wed Aug 30 13:59:22 CEST 2017

tree /etc/timezone/
/etc/timezone/

0 directories, 0 files

docker-compose up -d
Starting metasfreshdocker_db_1 ... 
Starting metasfreshdocker_search_1 ... 
Starting metasfreshdocker_search_1
Starting metasfreshdocker_db_1 ... error

ERROR: for metasfreshdocker_db_1 Cannot start service db: oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:339: container init caused \"rootfs_linux.go:57: mounting \\\"/etc/timezone\\\" to rootfs \\\"/var/lib/docker/overlay/cdabb2704d81bd0148958aebf7c60105c277638a50f9b6ee35aa386a58e84915/merged\\\" at \\\"/var/lib/docker/overlay/cdabb2704d81bd0148958aebf7c60105c277638a50f9b6ee35aa386a58e84915/merged/etc/timezone\\\" caused \\\"not a directory\\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the Starting metasfreshdocker_search_1 ... error

```

Best Regards

---

<div class="post-metadata">

**Author:** ![julian.bischof](https://forum.metasfresh.org/user_avatar/forum.metasfresh.org/julian.bischof/32/36_2.png) [@julian.bischof](https://forum.metasfresh.org/u/julian.bischof)\
**Post date:** [August 31, 2017, 7:46am UTC](https://forum.metasfresh.org/t/docker-install-on-mac-sierra/591/5 "2017-08-31T07:46:06Z")

</div>

Hi @pejas

Thank you for your feedback to the suggested solution.  
The metasfresh-docker installation tutorial is built around a Debian based OS (Ubuntu to be precise, since it’s one of the most common linux distros).

I think we can adapt our documentation to reflect your tests with a redhat based distribution, so thank you for your feedback 🙂

Julian
