2015-11-29 22:38:32 +00:00
|
|
|
FROM phusion/baseimage:0.9.17
|
2015-02-09 05:43:00 +00:00
|
|
|
MAINTAINER Xena <xena@yolo-swag.com>
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get -y install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make curl git-core luarocks lua-sec nodejs npm lua-discount
|
|
|
|
|
|
|
|
ENV SRC_DIR /opt
|
2015-11-29 22:38:32 +00:00
|
|
|
ENV OPENRESTY_VERSION 1.9.3.2
|
2015-02-09 05:43:00 +00:00
|
|
|
ENV OPENRESTY_PREFIX /app/openresty
|
|
|
|
|
|
|
|
RUN cd $SRC_DIR && curl -LO http://openresty.org/download/ngx_openresty-$OPENRESTY_VERSION.tar.gz &&\
|
|
|
|
tar xzf ngx_openresty-$OPENRESTY_VERSION.tar.gz && cd ngx_openresty-$OPENRESTY_VERSION &&\
|
|
|
|
./configure --prefix=$OPENRESTY_PREFIX &&\
|
|
|
|
make && make install && rm -rf ngx_openresty-$OPENRESTY_VERSION* &&\
|
|
|
|
luarocks install moonscript &&\
|
|
|
|
luarocks install moonbox &&\
|
2015-02-09 16:00:57 +00:00
|
|
|
npm install -g bower && npm install -g coffee-script &&\
|
2015-02-09 06:01:22 +00:00
|
|
|
ln -s /usr/bin/nodejs /usr/local/bin/node
|
2015-02-09 05:43:00 +00:00
|
|
|
|
|
|
|
ADD lapis /etc/service/lapis/run
|
|
|
|
ENTRYPOINT /sbin/my_init
|
|
|
|
|
|
|
|
ENV PORT 5000
|
|
|
|
EXPOSE 5000
|
|
|
|
ENV LAPIS_ENVIRONMENT docker
|
|
|
|
|
2015-02-09 06:01:22 +00:00
|
|
|
ONBUILD ADD BoxFile /app/src/BoxFile
|
2015-02-09 05:43:00 +00:00
|
|
|
ONBUILD RUN cd /app/src && moonbox install
|
2015-02-09 06:01:22 +00:00
|
|
|
ONBUILD ADD bower.json /app/src/bower.json
|
|
|
|
ONBUILD RUN cd /app/src && bower --allow-root install
|
2015-02-09 05:43:00 +00:00
|
|
|
ONBUILD ADD . /app/src
|
|
|
|
ONBUILD RUN moonc /app/src
|
2015-02-09 16:00:57 +00:00
|
|
|
ONBUILD RUN cd /app/src/static && find -name "*.coffee" -exec coffee -c {} \;
|