Changes

From SME Server
Jump to navigationJump to search
1,493 bytes added ,  14:52, 11 September 2014
m
change default storage location
Line 64: Line 64:  
  docker
 
  docker
 
to see the available command line options. But first and foremost read the [https://docs.docker.com/userguide/ excellent Docker documentation]
 
to see the available command line options. But first and foremost read the [https://docs.docker.com/userguide/ excellent Docker documentation]
 +
 +
 +
===Configuration===
 +
Docker comes with a configuration file located at:
 +
/etc/sysconfig/docker
 +
In this file you can set default parameters which are applicable to all containers run by Docker. By default it holds no arguments. All arguments can also be set manually when starting a container, in which case each individual container can have it's specific parameters.  To see a list all available arguments that can be used in the Docker configuration file enter:
 +
Docker -h
 +
 +
 +
====SME Server specifics====
 +
By default Docker will store all images, containers and other data in:
 +
/var/lib/docker
 +
For SME Server this is not ideal for we would like to incorporate all Docker data into the pre-defined backup procedure(s) that come with SME Server. The preferred location for Docker data would be:
 +
/home/e-smith/files/docker
 +
We want this to be the default location for all Docker data on SME Server, so we add the '-g' argument to the docker configuration file like this:
 +
# /etc/sysconfig/docker
 +
#
 +
# Other arguments to pass to the docker daemon process
 +
# These will be parsed by the sysv initscript and appended
 +
# to the arguments list passed to docker -d
 +
 +
other_args="-g /home/e-smith/files/docker"
 +
It is ''important'' that you make this change 'before' you start using docker otherwise it will create it's default storage location in /var/lib/docker.
 +
You can still change the storage location in a later stage by copying all data to the new location you've defined with the -g argument.
     

Navigation menu