2016-08-16 08:48:34 +00:00
|
|
|
FROM thallian/confd-env:latest
|
|
|
|
|
|
|
|
RUN addgroup syncer
|
2016-08-16 09:42:09 +00:00
|
|
|
RUN adduser -h /app -D -G syncer syncer
|
2016-08-16 08:48:34 +00:00
|
|
|
|
|
|
|
RUN apk --no-cache add tar make git openssl perl gcc musl-dev pcre pcre-dev openssl-dev lua lua-dev unzip curl
|
|
|
|
RUN apk --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted add luarocks5.1
|
|
|
|
|
2016-08-16 09:42:09 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
2016-08-16 08:48:34 +00:00
|
|
|
RUN luarocks-5.1 install luasec
|
|
|
|
RUN luarocks-5.1 install luaposix
|
|
|
|
RUN luarocks-5.1 install redis-lua
|
|
|
|
RUN luarocks-5.1 install busted
|
|
|
|
|
2016-08-16 09:42:09 +00:00
|
|
|
RUN mkdir /app/openresty
|
|
|
|
RUN wget -qO- https://openresty.org/download/openresty-1.9.15.1.tar.gz | tar -xz -C /app/openresty --strip 1
|
2016-08-16 08:48:34 +00:00
|
|
|
|
2016-08-16 09:42:09 +00:00
|
|
|
WORKDIR /app/openresty
|
2016-08-16 08:48:34 +00:00
|
|
|
RUN ./configure --prefix=/opt/openresty && make && make install
|
|
|
|
ENV PATH /opt/openresty/nginx/sbin:$PATH
|
|
|
|
|
2016-08-16 09:42:09 +00:00
|
|
|
WORKDIR /app
|
2016-08-16 08:48:34 +00:00
|
|
|
RUN git clone https://github.com/ostinelli/gin
|
|
|
|
ADD /rootfs /
|
|
|
|
|
|
|
|
RUN cd gin && patch -N -p1 < ../gin.patch
|
|
|
|
RUN cd gin && luarocks-5.1 make
|
|
|
|
ENV GIN_ENV production
|
|
|
|
|
|
|
|
RUN git clone https://github.com/koreader/koreader-sync-server.git server
|
2016-08-16 09:42:09 +00:00
|
|
|
RUN chown -R syncer:syncer /app
|
2016-08-16 08:48:34 +00:00
|
|
|
|
|
|
|
RUN apk del tar make git gcc musl-dev pcre-dev openssl-dev lua-dev
|
|
|
|
|
|
|
|
EXPOSE 7200
|