From 1c63243d18d93627244962cad3ec10f8298786fa Mon Sep 17 00:00:00 2001 From: "sebastian@vanwa.ch" Date: Tue, 11 Jun 2019 11:55:48 +0000 Subject: [PATCH 01/10] use gitlab ci --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..732039b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +services: + - docker:dind + +variables: + IMAGE_NAME: thallian/koreader-sync + +build: + stage: build + script: + - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY + - docker build -t $IMAGE_NAME:$CI_COMMIT_SHA . + - docker build -t $IMAGE_NAME:$CI_COMMIT_REF_NAME . + - docker build -t $IMAGE_NAME:latest . + - docker push $IMAGE_NAME:$CI_COMMIT_SHA + - docker push $IMAGE_NAME:$CI_COMMIT_REF_NAME + - docker push $IMAGE_NAME:latest From 8d64896e7386251098c4c8dde007a52c483716b2 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Sat, 21 Dec 2019 12:37:52 +0100 Subject: [PATCH 02/10] make it run on alpine 3.11 --- Dockerfile | 90 ++++++++++++++++++++++--------- README.md | 15 +----- rootfs/app/gin.patch => gin.patch | 13 +++-- 3 files changed, 76 insertions(+), 42 deletions(-) rename rootfs/app/gin.patch => gin.patch (84%) diff --git a/Dockerfile b/Dockerfile index f60961e..ecb5363 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,41 +1,81 @@ -FROM thallian/confd-env:latest +FROM alpine:3.11 as builder -ENV OPENRESTY_VERSION 1.11.2.4 +ENV RESTY_VERSION=1.15.8.2 +ENV RESTY_SHA256_SUM=436b4e84d547a97a18cf7a2522daf819da8087b188468946b5a89c0dd1ca5d16 + +RUN apk --no-cache add \ + bash \ + coreutils \ + perl \ + make \ + automake \ + autoconf \ + gcc \ + git \ + curl \ + lua5.1-dev \ + musl-dev \ + pcre-dev \ + zlib-dev \ + lua5.1 \ + luarocks5.1 \ + openssl \ + openssl-dev \ + pcre-dev \ + zlib-dev + +RUN ln -s /usr/bin/aclocal-1.16 /usr/bin/aclocal-1.15 +RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15 + +RUN wget https://openresty.org/download/openresty-$RESTY_VERSION.tar.gz +RUN echo "$RESTY_SHA256_SUM openresty-$RESTY_VERSION.tar.gz" | sha256sum -c - || exit 1 +RUN tar xvf openresty-$RESTY_VERSION.tar.gz +RUN cd openresty-$RESTY_VERSION && \ + ./configure --with-pcre-jit --with-ipv6 --with-http_v2_module && \ + make && \ + make install + +ADD gin.patch /gin.patch +RUN git clone https://github.com/ostinelli/gin + +WORKDIR /gin +RUN patch -N -p1 < ../gin.patch +RUN luarocks-5.1 make + +WORKDIR / +RUN git clone https://github.com/koreader/koreader-sync-server.git + +FROM thallian/confd-env:latest RUN addgroup syncer RUN adduser -h /app -D -G syncer syncer -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 +COPY --from=builder /usr/local/openresty /usr/local/openresty +COPY --from=builder /usr/local/share/lua/5.1 /usr/local/share/lua/5.1 +COPY --from=builder /usr/local/lib/lua/5.1 /usr/local/lib/lua/5.1 +COPY --from=builder /usr/local/lib/luarocks/rocks-5.1 /usr/local/lib/luarocks/rocks-5.1 +COPY --from=builder /usr/local/bin/gin /usr/local/bin/gin +COPY --from=builder --chown=syncer:syncer /koreader-sync-server /app/server -WORKDIR /app +RUN ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx -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 apk --no-cache add \ + redis \ + openssl \ + libgcc \ + pcre \ + lua5.1 \ + unzip \ + zlib -RUN mkdir /app/openresty -RUN wget -qO- https://openresty.org/download/openresty-$OPENRESTY_VERSION.tar.gz | tar -xz -C /app/openresty --strip 1 - -WORKDIR /app/openresty -RUN ./configure --prefix=/opt/openresty && make && make install -ENV PATH /opt/openresty/nginx/sbin:$PATH - -WORKDIR /app -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 -RUN chown -R syncer:syncer /app +WORKDIR / -RUN ln -s /usr/lib/lua /usr/local/lib/lua -RUN ln -s /usr/share/lua/ /usr/local/share/lua - -RUN apk del tar make git gcc musl-dev pcre-dev openssl-dev lua-dev zlib-dev +#RUN ln -s /usr/lib/lua /usr/local/lib/lua +#RUN ln -s /usr/share/lua/ /usr/local/share/lua EXPOSE 7200 VOLUME /var/lib/redis/ diff --git a/README.md b/README.md index 2a10bb4..6a01b89 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,8 @@ -[Koreader Sync Server](https://github.com/koreader/koreader-sync-server) to sync [Koreader](https://github.com/koreader/koreader) devices. +[Koreader Sync Server](https://github.com/koreader/koreader-sync-server) to sync +[Koreader](https://github.com/koreader/koreader) devices. # Volumes - `/var/lib/redis/` -- `/etc/ssl/nginx/:ro`: certificates must be here - -# Environment Variables -## CERT_NAME -- default: fullchain.pem - -Name of the certificate file. - -## KEY_NAME -- default: privkey.pem - -Name of the key file. # Ports - 7200 diff --git a/rootfs/app/gin.patch b/gin.patch similarity index 84% rename from rootfs/app/gin.patch rename to gin.patch index b3f87f7..9acbc0a 100644 --- a/rootfs/app/gin.patch +++ b/gin.patch @@ -3,10 +3,15 @@ index b9601ec..55f4469 100644 --- a/gin-0.2.0-1.rockspec +++ b/gin-0.2.0-1.rockspec @@ -18,8 +18,9 @@ dependencies = { - "busted = 2.0.rc10-0", - "lua-cjson = 2.1.0-1", +- "lua = 5.1", ++ "lua = 5.1", + "ansicolors = 1.0.2-3", +- "busted = 2.0.rc10-0", ++ "busted = 2.0.0-1", +- "lua-cjson = 2.1.0-1", ++ "lua-cjson = 2.1.0.6-1", "luasocket = 3.0rc1-2", -+ "luasec = 0.5-2", ++ "luasec = 0.9-1", "luafilesystem = 1.6.3-1", - "luaposix = 33.3.1-1", + "luaposix = 33.4.0", @@ -44,4 +49,4 @@ index 5ef537a..21ec8f9 100644 + local ok, response_status, response_headers = http_request({ method = request.method, url = full_url, - source = ltn12.source.string(request.body), \ No newline at end of file + source = ltn12.source.string(request.body), From 79e44b3425e29d2c7b29d02c26ec6b8dc55a3864 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Sat, 21 Dec 2019 12:38:36 +0100 Subject: [PATCH 03/10] remove dind service --- .gitlab-ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 732039b..2b75b53 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,3 @@ -services: - - docker:dind - variables: IMAGE_NAME: thallian/koreader-sync From 96f2398326a392f50ef6a455a89bb86b8da0bf50 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Sat, 21 Dec 2019 12:43:26 +0100 Subject: [PATCH 04/10] remove commented lines [skip ci] --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ecb5363..d3ed03e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -74,8 +74,5 @@ ENV GIN_ENV production WORKDIR / -#RUN ln -s /usr/lib/lua /usr/local/lib/lua -#RUN ln -s /usr/share/lua/ /usr/local/share/lua - EXPOSE 7200 VOLUME /var/lib/redis/ From fa42e8d4349df049ddfe0c1abd02867059e04215 Mon Sep 17 00:00:00 2001 From: shu Date: Sun, 26 Jul 2020 08:40:20 +0000 Subject: [PATCH 05/10] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d3ed03e..7ab83bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.11 as builder +FROM alpine:3.12 as builder ENV RESTY_VERSION=1.15.8.2 ENV RESTY_SHA256_SUM=436b4e84d547a97a18cf7a2522daf819da8087b188468946b5a89c0dd1ca5d16 From e3b9ca58911d03a3343147f5219bc50286ae234c Mon Sep 17 00:00:00 2001 From: shu Date: Sun, 26 Jul 2020 09:33:43 +0000 Subject: [PATCH 06/10] Update Dockerfile --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7ab83bc..55a8900 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,9 @@ RUN apk --no-cache add \ openssl \ openssl-dev \ pcre-dev \ - zlib-dev - + zlib-dev \ + patch + RUN ln -s /usr/bin/aclocal-1.16 /usr/bin/aclocal-1.15 RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15 From 44f4af83492c9dde9070dccde709f32c5937d611 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Tue, 28 Sep 2021 18:18:39 +0200 Subject: [PATCH 07/10] prepare for k3s --- Dockerfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 55a8900..341993e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,4 @@ -FROM alpine:3.12 as builder - -ENV RESTY_VERSION=1.15.8.2 -ENV RESTY_SHA256_SUM=436b4e84d547a97a18cf7a2522daf819da8087b188468946b5a89c0dd1ca5d16 +FROM alpine:3.14 as builder RUN apk --no-cache add \ bash \ @@ -28,6 +25,9 @@ RUN apk --no-cache add \ RUN ln -s /usr/bin/aclocal-1.16 /usr/bin/aclocal-1.15 RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15 +ENV RESTY_VERSION=1.19.3.2 +ENV RESTY_SHA256_SUM=ce40e764990fbbeb782e496eb63e214bf19b6f301a453d13f70c4f363d1e5bb9 + RUN wget https://openresty.org/download/openresty-$RESTY_VERSION.tar.gz RUN echo "$RESTY_SHA256_SUM openresty-$RESTY_VERSION.tar.gz" | sha256sum -c - || exit 1 RUN tar xvf openresty-$RESTY_VERSION.tar.gz @@ -38,13 +38,18 @@ RUN cd openresty-$RESTY_VERSION && \ ADD gin.patch /gin.patch RUN git clone https://github.com/ostinelli/gin +ENV GIN_VERSION=cb35e87fa0671fcf25e5bce5cb9487dee8b497e2 WORKDIR /gin +RUN git checkout "$GIN_VERSION" RUN patch -N -p1 < ../gin.patch RUN luarocks-5.1 make WORKDIR / RUN git clone https://github.com/koreader/koreader-sync-server.git +ENV SYNC_VERSION=d7d1ebff54240cfbade96a81f2971b6ad0afa33f +WORKDIR /koreader-sync-server +RUN git checkout "$SYNC_VERSION" FROM thallian/confd-env:latest @@ -77,3 +82,4 @@ WORKDIR / EXPOSE 7200 VOLUME /var/lib/redis/ + From 9160d819616b89aa446d4916fcaa1f6cdb66851f Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Tue, 15 Feb 2022 17:21:46 +0100 Subject: [PATCH 08/10] use new s6-rc layout --- .editorconfig | 9 -------- .gitlab-ci.yml | 21 ++++++++++++------- Dockerfile | 6 +++--- rootfs/etc/fix-attrs.d/01-redis | 1 - .../s6-rc.d/koreader-sync/dependencies | 1 + .../s6-rc.d}/koreader-sync/run | 2 +- .../etc/s6-overlay/s6-rc.d/koreader-sync/type | 1 + .../s6-rc.d}/redis/run | 2 +- rootfs/etc/s6-overlay/s6-rc.d/redis/type | 1 + .../s6-rc.d/user/contents.d/koreader-sync | 0 .../s6-overlay/s6-rc.d/user/contents.d/redis | 0 11 files changed, 21 insertions(+), 23 deletions(-) delete mode 100644 .editorconfig delete mode 100644 rootfs/etc/fix-attrs.d/01-redis create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/dependencies rename rootfs/etc/{services.d => s6-overlay/s6-rc.d}/koreader-sync/run (77%) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/type rename rootfs/etc/{services.d => s6-overlay/s6-rc.d}/redis/run (66%) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/redis/type create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/koreader-sync create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/redis diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index d741e40..0000000 --- a/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 4 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2b75b53..b8a93ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,18 @@ variables: - IMAGE_NAME: thallian/koreader-sync + CONTAINER_NAME: thallian/koreader-sync build: stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] script: - - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY - - docker build -t $IMAGE_NAME:$CI_COMMIT_SHA . - - docker build -t $IMAGE_NAME:$CI_COMMIT_REF_NAME . - - docker build -t $IMAGE_NAME:latest . - - docker push $IMAGE_NAME:$CI_COMMIT_SHA - - docker push $IMAGE_NAME:$CI_COMMIT_REF_NAME - - docker push $IMAGE_NAME:latest + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json + - >- + /kaniko/executor + --context "$CI_PROJECT_DIR" + --dockerfile "$CI_PROJECT_DIR/Dockerfile" + --destination "$CONTAINER_NAME:$CI_COMMIT_SHA" + --destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME" + --destination "$CONTAINER_NAME:latest" diff --git a/Dockerfile b/Dockerfile index 341993e..55c0639 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.14 as builder +FROM alpine:3.15 as builder RUN apk --no-cache add \ bash \ @@ -25,8 +25,8 @@ RUN apk --no-cache add \ RUN ln -s /usr/bin/aclocal-1.16 /usr/bin/aclocal-1.15 RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15 -ENV RESTY_VERSION=1.19.3.2 -ENV RESTY_SHA256_SUM=ce40e764990fbbeb782e496eb63e214bf19b6f301a453d13f70c4f363d1e5bb9 +ENV RESTY_VERSION=1.19.9.1 +ENV RESTY_SHA256_SUM=576ff4e546e3301ce474deef9345522b7ef3a9d172600c62057f182f3a68c1f6 RUN wget https://openresty.org/download/openresty-$RESTY_VERSION.tar.gz RUN echo "$RESTY_SHA256_SUM openresty-$RESTY_VERSION.tar.gz" | sha256sum -c - || exit 1 diff --git a/rootfs/etc/fix-attrs.d/01-redis b/rootfs/etc/fix-attrs.d/01-redis deleted file mode 100644 index 3ad7eb2..0000000 --- a/rootfs/etc/fix-attrs.d/01-redis +++ /dev/null @@ -1 +0,0 @@ -/var/lib/redis/ true redis 0640 0750 \ No newline at end of file diff --git a/rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/dependencies b/rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/dependencies new file mode 100644 index 0000000..7ba7514 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/dependencies @@ -0,0 +1 @@ +confd diff --git a/rootfs/etc/services.d/koreader-sync/run b/rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/run similarity index 77% rename from rootfs/etc/services.d/koreader-sync/run rename to rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/run index 295b349..6c5e348 100644 --- a/rootfs/etc/services.d/koreader-sync/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/run @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv sh +#!/bin/sh cd /app/server s6-setuidgid syncer gin start diff --git a/rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/type b/rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/services.d/redis/run b/rootfs/etc/s6-overlay/s6-rc.d/redis/run similarity index 66% rename from rootfs/etc/services.d/redis/run rename to rootfs/etc/s6-overlay/s6-rc.d/redis/run index 39fc60e..ef35afb 100644 --- a/rootfs/etc/services.d/redis/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/redis/run @@ -1,3 +1,3 @@ -#!/usr/bin/with-contenv sh +#!/bin/sh exec s6-setuidgid redis redis-server /etc/redis.conf diff --git a/rootfs/etc/s6-overlay/s6-rc.d/redis/type b/rootfs/etc/s6-overlay/s6-rc.d/redis/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/redis/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/koreader-sync b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/koreader-sync new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/redis b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/redis new file mode 100644 index 0000000..e69de29 From d9ac3b7128b24fc7e1b2b1ed814db2e4b27c8e50 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Tue, 12 Jul 2022 19:26:28 +0200 Subject: [PATCH 09/10] use newer base image --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 55c0639..a794cf7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.15 as builder +FROM docker.io/alpine:3.16 as builder RUN apk --no-cache add \ bash \ @@ -25,8 +25,8 @@ RUN apk --no-cache add \ RUN ln -s /usr/bin/aclocal-1.16 /usr/bin/aclocal-1.15 RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15 -ENV RESTY_VERSION=1.19.9.1 -ENV RESTY_SHA256_SUM=576ff4e546e3301ce474deef9345522b7ef3a9d172600c62057f182f3a68c1f6 +ENV RESTY_VERSION=1.21.4.1 +ENV RESTY_SHA256_SUM=0c5093b64f7821e85065c99e5d4e6cc31820cfd7f37b9a0dec84209d87a2af99 RUN wget https://openresty.org/download/openresty-$RESTY_VERSION.tar.gz RUN echo "$RESTY_SHA256_SUM openresty-$RESTY_VERSION.tar.gz" | sha256sum -c - || exit 1 @@ -51,7 +51,7 @@ ENV SYNC_VERSION=d7d1ebff54240cfbade96a81f2971b6ad0afa33f WORKDIR /koreader-sync-server RUN git checkout "$SYNC_VERSION" -FROM thallian/confd-env:latest +FROM docker.io/thallian/confd-env:3.16 RUN addgroup syncer RUN adduser -h /app -D -G syncer syncer From 1843ab3ac1d2bce6e8d304dc5b61aaafb8a82895 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Fri, 15 Dec 2023 12:22:39 +0100 Subject: [PATCH 10/10] update to new version and gitea actions --- .gitea/workflows/container.yaml | 12 ++++++++++++ .gitlab-ci.yml | 18 ------------------ Dockerfile => Containerfile | 12 ++++++------ 3 files changed, 18 insertions(+), 24 deletions(-) create mode 100644 .gitea/workflows/container.yaml delete mode 100644 .gitlab-ci.yml rename Dockerfile => Containerfile (87%) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml new file mode 100644 index 0000000..e48b3fd --- /dev/null +++ b/.gitea/workflows/container.yaml @@ -0,0 +1,12 @@ +name: Build Multiarch Container Image +on: [push] +jobs: + call-reusable-workflow: + uses: container/multiarch-build-workflow/.gitea/workflows/build.yaml@main + with: + repository: ${{ gitea.repository }} + ref_name: ${{ gitea.ref_name }} + sha: ${{ gitea.sha }} + registry_url: ${{ secrets.REGISTRY_URL }} + registry_user: ${{ secrets.REGISTRY_USER }} + registry_pw: ${{ secrets.REGISTRY_PW }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index b8a93ab..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,18 +0,0 @@ -variables: - CONTAINER_NAME: thallian/koreader-sync - -build: - stage: build - image: - name: gcr.io/kaniko-project/executor:debug - entrypoint: [""] - script: - - mkdir -p /kaniko/.docker - - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json - - >- - /kaniko/executor - --context "$CI_PROJECT_DIR" - --dockerfile "$CI_PROJECT_DIR/Dockerfile" - --destination "$CONTAINER_NAME:$CI_COMMIT_SHA" - --destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME" - --destination "$CONTAINER_NAME:latest" diff --git a/Dockerfile b/Containerfile similarity index 87% rename from Dockerfile rename to Containerfile index a794cf7..b67fce1 100644 --- a/Dockerfile +++ b/Containerfile @@ -1,4 +1,4 @@ -FROM docker.io/alpine:3.16 as builder +FROM docker.io/alpine:3.19 as builder RUN apk --no-cache add \ bash \ @@ -21,12 +21,12 @@ RUN apk --no-cache add \ pcre-dev \ zlib-dev \ patch - + RUN ln -s /usr/bin/aclocal-1.16 /usr/bin/aclocal-1.15 RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15 -ENV RESTY_VERSION=1.21.4.1 -ENV RESTY_SHA256_SUM=0c5093b64f7821e85065c99e5d4e6cc31820cfd7f37b9a0dec84209d87a2af99 +ENV RESTY_VERSION=1.21.4.3 +ENV RESTY_SHA256_SUM=33a84c63cfd9e46b0e5c62eb2ddc7b8068bda2e1686314343b89fc3ffd24cdd3 RUN wget https://openresty.org/download/openresty-$RESTY_VERSION.tar.gz RUN echo "$RESTY_SHA256_SUM openresty-$RESTY_VERSION.tar.gz" | sha256sum -c - || exit 1 @@ -47,11 +47,11 @@ RUN luarocks-5.1 make WORKDIR / RUN git clone https://github.com/koreader/koreader-sync-server.git -ENV SYNC_VERSION=d7d1ebff54240cfbade96a81f2971b6ad0afa33f +ENV SYNC_VERSION=14c64347627d07cf6e72552705bf1642a39a8908 WORKDIR /koreader-sync-server RUN git checkout "$SYNC_VERSION" -FROM docker.io/thallian/confd-env:3.16 +FROM docker.io/thallian/confd-env:3.19-3.1.6.2 RUN addgroup syncer RUN adduser -h /app -D -G syncer syncer