...
- Be sure, that user that launches docker container has write permissions on the mounting folders.
- 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)
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.
- On Windows mounting folders must be located in C:/Users, on Mac OS X - in /Users
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
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.
In order to sync timezone of docker containers with host machine, we should add the following parameters in docker run command:
Code Block language bash -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro
Further to this, you must make sure the
/etc/localtime
and/etc/timezone
files are configured correctly:/etc/timezone
file contains as a string selected from timezone db "https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"./etc/localtime
file is linked to correct file from/usr/share/zoneinfo/
Further reading: http://www.thegeekstuff.com/2010/09/change-timezone-in-linux/
Run DMS PostgreSQL container on Windows or Mac OS X
...