koreader-sync/Dockerfile

40 lines
1.1 KiB
Docker
Raw Normal View History

2016-11-01 15:06:58 +00:00
FROM quay.io/thallian/confd-env:latest
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-01-13 09:45:58 +00:00
RUN apk --no-cache add tar redis make git openssl 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
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 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/