Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix timezone issue.

...

  1. Be sure, that user that launches docker container has write permissions on the mounting folders.
  2. The version of the Linux kernel version for Ubuntu host machine must be 3.16 or higher (Lower versions contain bug that causes impossibility to use 'su' command in container with '–net=host' option enabled)
  3. If you want to restart docker containers on boot or in case of failure, you should add "–restart=always" option to the run command of container. The container will not be restarted if it's stopped with "docker kill/stop" command. Here is the example for elasticsearch:

    Code Block
    docker run -p 9200:9200 -p 9300:9300 \
    	--restart=always \
        -v /local_elasticsearch_data_folder:/data \
        -v /etc/localtime:/etc/localtime:ro \
        -v /etc/timezone:/etc/timezone:ro \
    	--net=host \
        --name elastic -d practiceinsight/dms_elasticsearch

    If you want to start Nuxeo container on boot then you need to add this option to elasticsearch and postgres containers also.

  4.  On Windows mounting folders must be located in C:/Users, on Mac OS X - in /Users 
  5. When you are starting the container on Windows, folder must be mounted that way (two slashes are needed for the windows path): 

    Code Block
    -v //c/users/:/path_in_container
  6. If you operate docker on Windows with Docker Quickstart Terminal, then execution of the docker exec commands on windows must be done in the docker machine command line. if the docker machine is called "default", then you can get access to it with:

    Code Block
    docker-machine ssh default

    If you operate docker with PowerShell then this step is unnecessary.

  7. In order to sync timezone of docker containers with host machine, we should add the following parameter parameters in docker run command:

    Code Block
    languagebash
    -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro

Run DMS PostgreSQL container on Windows or Mac OS X

...

Code Block
docker run -p 5432:5432 -v /backup_folder_on_host:/backup \
    -v /etc/localtime:/etc/localtime:ro \
    -v /etc/timezone:/etc/timezone:ro \
    --net=host --name postgres -d practiceinsight/dms_postgresql_winmac

...

Code Block
docker run -p 5432:5432 \
    -v /backup_folder_on_host:/backup
    -v /local_postgres_data_folder:/var/db/postgres/data:/var/db/postgres/data \
    -v /etc/localtime:/etc/localtime:ro \
    -v /etc/localtimetimezone:/etc/localtimetimezone:ro \
	--net=host \
    --name postgres -d practiceinsight/dms_postgresql

...

Code Block
docker run -p 9200:9200 -p 9300:9300 \
    -v /local_elasticsearch_data_folder:/data \
    -v /etc/localtime:/etc/localtime:ro \
    -v /etc/timezone:/etc/timezone:ro \
	--net=host \
    --name elastic -d practiceinsight/dms_elasticsearch

...

Code Block
docker run -p 8080:8080 -p 9080:9080 \
    -v /local_nuxeo_data_folder:/var/lib/nuxeo/data \
    -v /local_config_folder:/etc/nuxeo \
	-v /windows_fonts_folder:/home/nuxeo/.windows_fonts
    -v /etc/localtime:/etc/localtime:ro \
    -v /etc/timezone:/etc/timezone:ro \
    --net=host \
    --name nuxeo practiceinsight/dms_nuxeo_suite:1.9.5

...