This document specifies the properties of Docker containers maintained by Mediadepot
-
Containers should be based off of mediadepot/base when possible (which itself is based on alpine linux)
-
mediadepot/base is lightweight and only installs the following:
- git
- updates ~/.ssh/known_hosts with github.com
- sets the WORKDIR to
/srv
- creates
/srv/config.sh
which creates a depot user and group from specified environmental variables:$PUID
and$PGID
- defaults to using 1000:1000 if
PUID
andGUID
are not specified
- defaults to using 1000:1000 if
-
Only a single application/process should be present in each container (no phusion/base usage)
-
Containers should store their application source in
/srv/{application name}/app
-
Containers should store their application data in
/srv/{application name}/data
- Application data is anything that can be automatically re-generated by the application and does not need to be backed up (transcode folder, media cover images, etc)
-
Containers should store their configuration data in
/srv/{application name}/config
- Configuration data is any data that is required to restore a new installation of the application to its previously configured state (*.ini files, database files, etc)
-
Applications which are installed via a package or expect to live at a specific path on the file system should be stored in the application folders listed above and symlinked to the expected paths.
-
Every application container should create a
/srv/start.sh
script which does the following- calls the
/srv/config.sh
script provided bymediadepot/base
to generate the depot user with correct UID and GID - should run the application as the depot user
- calls the
-
http://www.linuxserver.io/index.php/migrating-to-linuxserver-io-dockers/