The Docker run image for Modulus static applications.
Shell Nginx
Latest commit bb44566 Oct 28, 2016 @chosenken chosenken Fix nginx version
Signed-off-by: Ken Herner <>

Modulus Static Docker Run Image

The Modulus images are a set of Docker images designed to run arbitrary applications with a standardized external interface. The Modulus image convention enforces a high degree of security and control required by PaaS environments and might not be suitable for small, more focused, deployments.

Refer to the base run image for details on how all Modulus Run Images work.

Image Details

The Modulus static image supports Nginx version 1.8 and directly serves deployed content. Site-specific configurations can be provided by adding a sites-enabled folder to the application bundle.

How to use this image

All Modulus images enforce a strict data convention for security and ease of orchestration. Application source should be mounted in externally and assumptions are made based on these directories.

  |- app/
  |- home/
  |- log/
  |- tmp/
  |- supervisor.conf

The only requirement for a basic running container is to put static content in the app folder. Then mount this directory to /mnt inside the container.

$ docker pull onmodulus/run-static
$ docker run -v /host-folder:/mnt -p 80:8080 onmodulus/run-static start

All Modulus run images have a binary available in the PATH named "start" that is a script designed to run the inner application. The start script is the most important part of each image type and is what's responsible for properly running the underlying application.

The start script in the static run image simply runs the Nginx process with default configuration.

Even though you can run the start script directly, Modulus has adopted supervisord as the underlying process monitor for all application types. The supervisor daemon is preconfigured in all run images to load /mnt/supervisor.conf. The high-level Modulus tools generate this configuration file to support passing environment variables into the application and redirect all log output to /mnt/log/app.log. The supervisor daemon is already baked into the underlying run image init process, so you can run the image directly once a supervisor.conf file is provided.


Save this to /host-folder/supervisor.conf and run the container.

$ docker run -v /host-folder:/mnt -p 80:8080 onmodulus/run-static


Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.