Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with /etc/localtime with docker on Mac #151

Closed
luketpeterson opened this issue Aug 6, 2020 · 1 comment
Closed

problem with /etc/localtime with docker on Mac #151

luketpeterson opened this issue Aug 6, 2020 · 1 comment

Comments

@luketpeterson
Copy link

luketpeterson commented Aug 6, 2020

Following the instructions in the ReadMe, the opencog container won't start. The problem is the way the MacOS virtualizes the /etc/ filesystem, and the way the OpenCog container maps /etc/localtime

This issue affects many containers, and is not OpenCog specific. Nonetheless the recommended work-around is a change to the container.

See this thread. [https://github.com/docker/for-mac/issues/2396]

The solution I implemented is from the commend by the user: “smlng” on Dec 19, 2018

Config Details
Mac OS 10.15.6
docker engine 19.03.12

Proposed Change
I changed the docker/opencog/common.yml file

diff --git a/opencog/common.yml b/opencog/common.yml
index 0b6e758..0b12426 100644
--- a/opencog/common.yml
+++ b/opencog/common.yml
@@ -13,7 +13,7 @@ workspace:
     volumes:
         - $OPENCOG_SOURCE_DIR:/opencog
         - $HOME/.gitconfig:/home/opencog/.gitconfig # for git commits,stash ...
-        - /etc/localtime:/etc/localtime:ro # for syncing with host time.
+        - ${ETC_LOCALTIME}:/etc/localtime:ro # for syncing with host time.
         - $CCACHE_DIR:/home/opencog/.ccache # for persisting ccache artifacts
     environment: # Set environment variables within the container
         - OPENCOG_SOURCE_DIR=/opencog

And then set the environment variable along with all the others from the ReadMe.

So, my .zshenv (or .bashrc for those who use bash) now specifies:

#OpenCog envs 
export ETC_LOCALTIME=$(readlink /etc/localtime)
export CCACHE_DIR=$HOME/OpenCog/ccache_output
export OPENCOG_SOURCE_DIR=$HOME/OpenCog/opencog
export ATOMSPACE_SOURCE_DIR=$HOME/OpenCog/atomspace
export COGUTIL_SOURCE_DIR=$HOME/OpenCog/cogutil
export OC2MC_SOURCE_DIR=$HOME/OpenCog/opencog-to-minecraft
linas added a commit that referenced this issue Dec 2, 2021
This fixes issue #151.
It also removes obsolete, unused port 18001.
@linas linas mentioned this issue Dec 2, 2021
@linas
Copy link
Member

linas commented Dec 2, 2021

Closing; fixed in pull req #162

@linas linas closed this as completed Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants