Public | Automated Build

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description


Phusion Passenger Standalone running on Alpine Linux in Docker.

Available on Docker Hub:

Super simple Rack example

Shamelessly copy the example on the rack website ...

run { |env| ['200', {'Content-Type' => 'text/html'}, ['get rack\'d']] }

... add a Dockerfile ...

# Dockerfile
FROM lincheney/alpine-passenger
RUN apk add --update ruby-rack && rm -rf /var/cache/apk/*
COPY /usr/src/app/

... build the image and then run it!

> docker build -t rack-example .
> docker run -d -p 80:3000 --name rack-app rack-example
> curl 'http://localhost'
get rack'd

We can also get the Passenger status:

> docker exec rack-app passenger status
Phusion Passenger Standalone is running on PID 37, according to PID file /usr/src/app/


The image based on Alpine Linux 3.2
running the Phusion Passenger Standalone runtime 5.0.21
with native support compiled for Ruby 2.2.3.

Phusion Passenger Standalone

The standalone runtime runs on Nginx. Those interested should take a look at the
docs provided by the Phusion team, especially command line options
and Nginx configuration

Default command line arguments

By default, the image runs with passenger start --no-install-runtime --no-compile-runtime --no-download
plus the additional arguments supplied to docker run.

Passenger runs on port 3000 by default and this port has been exposed.

Edge packages

Passenger requires packages only available in the testing repository of Alpine Linux edge:
libexecinfo and libexecinfo-dev.

Building extension modules

You can use this image to build the Nginx or Apache modules for Phusion Passenger.
Take care that you will need to compile from source! Pre-compiled binaries that the Phusion team
provide (probably) won't work since Alpine Linux uses musl instead of glibc.

Have a look at the alpine-passenger Dockerfile to see how the standalone runtime was compiled.

Docker Pull Command
Source Repository

Comments (1)
a year ago

Just a thought: Wouldn't it be better to add a dedicated "app" user and run /usr/src/app and passenger with his rights? Currently passenger runs as root.