6. Install Internet Apps in Docker Containers¶
In this chapter, we will install Internet apps (Internet service software) with which users directly interact, such as file/contact/calendar syncing (ownCloud), Web Analytics (Piwik), instant messaging (XMPP), etc. None of these software is essential in this framework, so you can choose to install only the ones which you need.
This chapter only introduces a limited number of Internet apps, to serve as examples. In this chapter, all of the Internet apps are configured to be fit in the framework introduced in Technical Overview. The basic rules for deploying an Internet app are (as illustrated in Fig. 2.1):
- If needed, forward Nginx incoming connections to the Internet app.
- If needed, use the dnsmasq instance on the host to look up other services (containers).
- If needed, use the MariaDB instance configured in Install MariaDB as the SQL database.
- If needed, use the OpenLDAP instance configured in Install OpenLDAP for authentication.
- If needed, use the Postfix instance configured in Configure Postfix for sending out emails.
- If needed, add a data container for data storage on the file system.
As long as an Internet app can be deployed complying the rules above, it would fit in this framework.
At the beginning of each section in this chapter, the rules above followed by the corresponding Internet app deployment are listed for easier reference.
Upgrade an Internet App
Unless otherwise stated, to upgrade an Internet app, follow the following steps:
- pull the latest image:
docker pull the-image,
- remove the currently running container by executing
docker rm -f container,
- run the same
docker runcommand as same as the first time the container was started,
flush hostsin the MariaDB shell if MariaDB is used for this app to empty the MariaDB host cache (similar to Create a New Database and User in MariaDB, but only run
flush hostsafter entering the MariaDB shell).
- 6.1. OwnCloud, A File Synchronization and Cloud Service
- 6.2. Piwik, A Web Analytics Platform
- 6.3. Prosody, An XMPP Communication Server
- 6.4. Isso, A Commenting Server
- 6.5. LTB Self Service Password, Allowing Users to Change Their Passwords
- 6.6. Firefox Sync Server, Synchronizing Firefox Across Devices