2017-09-11 09:15:17 +00:00
|
|
|
FROM registry.gitlab.com/thallian/docker-confd-env:master
|
2016-08-16 08:48:34 +00:00
|
|
|
|
2017-09-11 09:15:17 +00:00
|
|
|
ENV OPENRESTY_VERSION 1.11.2.4
|
2017-06-13 12:35:44 +00:00
|
|
|
|
2016-08-16 08:48:34 +00:00
|
|
|
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
|
|
|
|
2017-06-13 15:40:32 +00:00
|
|
|
RUN apk --no-cache add tar redis make git libressl libssl1.0 perl gcc musl-dev pcre pcre-dev openssl-dev lua lua-dev unzip zlib zlib-dev curl luarocks libgcc
|
2016-08-16 08:48:34 +00:00
|
|
|
|
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
|
2017-06-13 12:35:44 +00:00
|
|
|
RUN wget -qO- https://openresty.org/download/openresty-$OPENRESTY_VERSION.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
|
|
|
|
2016-08-16 10:39:39 +00:00
|
|
|
RUN ln -s /usr/lib/lua /usr/local/lib/lua
|
|
|
|
RUN ln -s /usr/share/lua/ /usr/local/share/lua
|
|
|
|
|
2017-01-10 15:41:58 +00:00
|
|
|
RUN apk del tar make git gcc musl-dev pcre-dev openssl-dev lua-dev zlib-dev
|
2016-08-16 08:48:34 +00:00
|
|
|
|
|
|
|
EXPOSE 7200
|
2016-08-16 12:07:19 +00:00
|
|
|
VOLUME /var/lib/redis/
|