Setup discourse on Mac OS

AI-generated summary

sevenmaxis reported encountering Docker mount errors while attempting to install Discourse locally on macOS, specifically noting that the /var path is reserved by Docker and cannot be shared. Although they tried installing in /Users and /var/discourse, the issue persisted. Falco clarified that Docker is intended for production and suggested a specific guide for local development. sevenmaxis expressed a preference for using Docker despite the complexity. Ishan_Dutta joined the thread facing similar issues, leading to a discussion about the necessity of a remote Linux host versus local installation. sevenmaxis clarified they were SSHing into a Linux box for development, while Ishan_Dutta questioned why a remote host was needed if the parent machine was Linux, eventually finding a non-Docker plugin installation method. Finally, johanrydstrom provided a solution for macOS users, explaining that /var is a symlink to /private/var and recommending that users update their containers/app.yml volume paths to use /private/var instead to resolve the mount denial.

I’m following standard guide to install discourse on my local mac.
After launching the setup tool ./discourse-setup I’ve got error message:

cd /pups && git pull && /pups/bin/pups --stdin /usr/local/bin/docker: Error response from daemon: Mounts denied: er.com/docker-for-mac/osxfs/#namespaces for more info. . r/discourse/shared/standalone/log/var-log are not shared from OS X and are not known to Docker. You can configure shared paths from Docker -> Preferences... -> File Sharing.
Initially I’ve tried to install to my work directory inside /Users

Then I installed to /var/discourse folder, the same error.

And then I tried to add /var folder to Docker’s Sharing Files and got message
The path /var is reserved by Docker

What am I missing here?

Discourse uses Docker when installing in production.

For local install to thinker with, use this guide:

Well, it seems to me there should be a quick fix, using docker is the pleasure and convenience.

Did you find the fix ? I am facing the same

No, I didn’t, have to work on remote host

whats the difference?
what if I consider localhost as the remote host ?

Edit:
I don’t get it, do I need two /var directory ?

the remote host is linux

So I won’t need a remote host if my parent host is linux right ?
This sounds silly, there should be some workaround.
Still I doubt if parent is a linux why wouldn’t docker say
The path /var is reserved by Docker

Kind of misunderstanding, I’m ssh’ing to linux box, installed there docker and then discourse - that’s my development environment for now.

I am only talking about development machine, say I have a linux box, installed docker and discourse. How does it matter whether I access it remotely from some other machine or open that machine directly.

EDIT:
To add, In mac development environment I am able to create plugins and be able to run them from local server, why can’t I install it in development, why would I need a remote server to be able to install it.

EDIT2:
found this: for non docker install
bundle exec rake plugin:install repo=<repo url>

It might depend on version of OS X and/or docker, but on my machine /var is just a symlink to the real folder /private/var.

Changing the volume paths in containers/app.yml (or whatever your configuration file is) to something like:
`
volumes:

  • volume:
    host: /private/var/discourse/shared/web-only
    guest: /shared
  • volume:
    host: /private/var/discourse/shared/web-only/log/var-log
    guest: /var/log
    `

did it for me.