2016-10-09 20:44:11 -07:00
|
|
|
# Overview
|
2016-08-17 10:59:09 -07:00
|
|
|
|
2016-08-20 10:22:32 -07:00
|
|
|
The application's Dockerfile must specify the FROM base image to be `cloudron/base:0.9.0`.
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
The base image already contains most popular software packages including node, nginx, apache,
|
|
|
|
|
ruby, PHP. Using the base image greatly reduces the size of app images.
|
|
|
|
|
|
|
|
|
|
The goal of the base image is simply to provide pre-downloaded software packages. The packages
|
|
|
|
|
are not configured in any way and it's up to the application to configure them as they choose.
|
|
|
|
|
For example, while `apache` is installed, there are no meaningful site configurations that the
|
|
|
|
|
application can use.
|
|
|
|
|
|
2016-10-09 20:44:11 -07:00
|
|
|
# Packages
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
The following packages are part of the base image. If you need another version, you will have to
|
|
|
|
|
install it yourself.
|
|
|
|
|
|
2016-08-20 10:22:32 -07:00
|
|
|
* Apache 2.4.18
|
|
|
|
|
* Composer 1.2.0
|
|
|
|
|
* Go 1.5.4, 1.6.3
|
|
|
|
|
* Gunicorn 19.4.5
|
|
|
|
|
* Java 1.8
|
|
|
|
|
* Maven 3.3.9
|
2016-08-20 10:59:26 -07:00
|
|
|
* Mongo 2.6.10
|
2016-08-20 10:22:32 -07:00
|
|
|
* MySQL Client 5.7.13
|
|
|
|
|
* nginx 1.10.0
|
|
|
|
|
* Node 0.10.40, 0.12.7, 4.2.6, 4.4.7 (installed under `/usr/local/node-<version>`) [more information](#node-js)
|
|
|
|
|
* Perl 5.22.1
|
|
|
|
|
* PHP 7.0.8
|
|
|
|
|
* Postgresql client 9.5.4
|
|
|
|
|
* Python 2.7.12
|
2016-08-20 11:03:49 -07:00
|
|
|
* Redis 3.0.6
|
2016-08-20 10:22:32 -07:00
|
|
|
* Ruby 2.3.1
|
|
|
|
|
* sqlite3 3.11.0
|
|
|
|
|
* Supervisor 3.2.0
|
|
|
|
|
* uwsgi 2.0.12
|
2016-08-17 10:59:09 -07:00
|
|
|
|
2016-10-09 20:44:11 -07:00
|
|
|
# Inspecting the base image
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
The base image can be inspected by installing [Docker](https://docs.docker.com/installation/).
|
|
|
|
|
|
|
|
|
|
Once installed, pull down the base image locally using the following command:
|
|
|
|
|
```
|
2016-08-20 10:22:32 -07:00
|
|
|
docker pull cloudron/base:0.9.0
|
2016-08-17 10:59:09 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
To inspect the base image:
|
|
|
|
|
```
|
2016-08-20 10:22:32 -07:00
|
|
|
docker run -ti cloudron/base:0.9.0 /bin/bash
|
2016-08-17 10:59:09 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
*Note:* Please use `docker 1.9.0` or above to pull the base image. Doing otherwise results in a base
|
2016-08-20 10:22:32 -07:00
|
|
|
image with an incorrect image id. The image id of `cloudron/base:0.9.0` is `d038af182821`.
|
2016-08-17 10:59:09 -07:00
|
|
|
|
2016-10-09 20:44:11 -07:00
|
|
|
# The `cloudron` user
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
The base image contains a user named `cloudron` that apps can use to run their app.
|
|
|
|
|
|
|
|
|
|
It is good security practice to run apps as a non-previleged user.
|
|
|
|
|
|
2016-10-09 20:44:11 -07:00
|
|
|
# Env vars
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
The following environment variables are set as part of the application runtime.
|
|
|
|
|
|
2016-10-09 20:44:11 -07:00
|
|
|
## API_ORIGIN
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
API_ORIGIN is set to the HTTP(S) origin of this Cloudron's API. For example,
|
|
|
|
|
`https://my-girish.cloudron.us`.
|
|
|
|
|
|
2016-10-09 20:44:11 -07:00
|
|
|
## APP_DOMAIN
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
APP_DOMAIN is set to the domain name of the application. For example, `app-girish.cloudron.us`.
|
|
|
|
|
|
2016-10-09 20:44:11 -07:00
|
|
|
## APP_ORIGIN
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
APP_ORIGIN is set to the HTTP(S) origin on the application. This is origin which the
|
|
|
|
|
user can use to reach the application. For example, `https://app-girish.cloudron.us`.
|
|
|
|
|
|
2016-10-09 20:44:11 -07:00
|
|
|
## CLOUDRON
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
CLOUDRON is always set to '1'. This is useful to write Cloudron specific code.
|
|
|
|
|
|
2016-10-09 20:44:11 -07:00
|
|
|
## WEBADMIN_ORIGIN
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
WEBADMIN_ORIGIN is set to the HTTP(S) origin of the Cloudron's web admin. For example,
|
|
|
|
|
`https://my-girish.cloudron.us`.
|
|
|
|
|
|
2016-10-09 20:44:11 -07:00
|
|
|
# Node.js
|
2016-08-17 10:59:09 -07:00
|
|
|
|
|
|
|
|
The base image comes pre-installed with various node.js versions.
|
|
|
|
|
|
|
|
|
|
They can be used by adding `ENV PATH /usr/local/node-<version>/bin:$PATH`.
|
|
|
|
|
|
2016-09-09 14:12:52 +02:00
|
|
|
See [Packages](/references/baseimage.html#packages) for available versions.
|