33 lines
1.1 KiB
Docker
33 lines
1.1 KiB
Docker
# Run passenger in a container
|
|
|
|
FROM alpine:3.3
|
|
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
|
|
|
|
ENV WORKDIR /src
|
|
|
|
RUN echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
|
|
&& apk update \
|
|
&& apk add git perl gcc g++ curl-dev \
|
|
ruby ruby-rake ruby-rack ruby-dev \
|
|
libexecinfo-dev@testing linux-headers make \
|
|
ruby-bundler ruby-bigdecimal ruby-io-console ruby-irb nodejs \
|
|
sqlite-dev mariadb-dev postgresql-dev procps \
|
|
&& echo "PATH=$WORKDIR/passenger/bin:$WORKDIR/nginx/sbin:$PATH" >> /etc/profile \
|
|
&& mkdir $WORKDIR \
|
|
&& cd $WORKDIR \
|
|
&& git clone https://github.com/phusion/passenger.git \
|
|
&& cd passenger/ \
|
|
&& git submodule update --init --recursive \
|
|
&& EXTRA_CXX_LDFLAGS="-lexecinfo" ./bin/passenger-install-nginx-module --prefix=$WORKDIR/nginx --auto
|
|
|
|
COPY nginx.conf $WORKDIR/nginx/conf/nginx.conf
|
|
|
|
ENV USER foreman
|
|
ENV UID 30000
|
|
ENV HOME $WORKDIR/$USER
|
|
ENV SHELL /bin/true
|
|
RUN adduser -D -s $SHELL -h $HOME -u $UID $USER
|
|
## ENV BUNDLE_PATH ".bundle"
|
|
|
|
ENTRYPOINT [ "/bin/sh", "-c", "$WORKDIR/nginx/sbin/nginx" ]
|