From 8790fdcada9549ebfb5cb426f3b8a7edbc837708 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Tue, 16 Aug 2016 11:42:09 +0200 Subject: [PATCH] new root dir --- Dockerfile | 15 ++++++++------- rootfs/{var/lib/koreader-sync => app}/gin.patch | 0 rootfs/etc/services.d/koreader-sync/run | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) rename rootfs/{var/lib/koreader-sync => app}/gin.patch (100%) diff --git a/Dockerfile b/Dockerfile index 061c3b7..cb803e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,26 @@ FROM thallian/confd-env:latest RUN addgroup syncer -RUN adduser -h /var/lib/koreader-sync -D -G syncer syncer +RUN adduser -h /app -D -G syncer syncer 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 +WORKDIR /app + 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 -RUN mkdir /tmp/openresty -RUN wget -qO- https://openresty.org/download/openresty-1.9.15.1.tar.gz | tar -xz -C /tmp/openresty --strip 1 +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 -WORKDIR /tmp/openresty +WORKDIR /app/openresty RUN ./configure --prefix=/opt/openresty && make && make install -RUN rm -r /tmp/openresty ENV PATH /opt/openresty/nginx/sbin:$PATH -WORKDIR /var/lib/koreader-sync +WORKDIR /app RUN git clone https://github.com/ostinelli/gin ADD /rootfs / @@ -28,7 +29,7 @@ RUN cd gin && luarocks-5.1 make ENV GIN_ENV production RUN git clone https://github.com/koreader/koreader-sync-server.git server -RUN chown -R syncer:syncer /var/lib/koreader-sync +RUN chown -R syncer:syncer /app RUN apk del tar make git gcc musl-dev pcre-dev openssl-dev lua-dev diff --git a/rootfs/var/lib/koreader-sync/gin.patch b/rootfs/app/gin.patch similarity index 100% rename from rootfs/var/lib/koreader-sync/gin.patch rename to rootfs/app/gin.patch diff --git a/rootfs/etc/services.d/koreader-sync/run b/rootfs/etc/services.d/koreader-sync/run index ae0e558..295b349 100644 --- a/rootfs/etc/services.d/koreader-sync/run +++ b/rootfs/etc/services.d/koreader-sync/run @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv sh -cd /var/lib/koreader-sync/server +cd /app/server s6-setuidgid syncer gin start -tail -f /var/lib/koreader-sync/server/logs/production-access.log +tail -f /app/server/logs/production-access.log