Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.76 KB

CONTAINER_DESIGN.md

File metadata and controls

26 lines (20 loc) · 1.76 KB

Container Design

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 and GUID are not specified
  • 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 by mediadepot/base to generate the depot user with correct UID and GID
    • should run the application as the depot user
  • http://www.linuxserver.io/index.php/migrating-to-linuxserver-io-dockers/