use new s6-rc layout

This commit is contained in:
Sebastian Hugentobler 2022-02-15 17:21:46 +01:00
parent 44f4af8349
commit 9160d81961
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
11 changed files with 21 additions and 23 deletions

View File

@ -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

View File

@ -1,13 +1,18 @@
variables: variables:
IMAGE_NAME: thallian/koreader-sync CONTAINER_NAME: thallian/koreader-sync
build: build:
stage: build stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script: script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY - mkdir -p /kaniko/.docker
- docker build -t $IMAGE_NAME:$CI_COMMIT_SHA . - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- docker build -t $IMAGE_NAME:$CI_COMMIT_REF_NAME . - >-
- docker build -t $IMAGE_NAME:latest . /kaniko/executor
- docker push $IMAGE_NAME:$CI_COMMIT_SHA --context "$CI_PROJECT_DIR"
- docker push $IMAGE_NAME:$CI_COMMIT_REF_NAME --dockerfile "$CI_PROJECT_DIR/Dockerfile"
- docker push $IMAGE_NAME:latest --destination "$CONTAINER_NAME:$CI_COMMIT_SHA"
--destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME"
--destination "$CONTAINER_NAME:latest"

View File

@ -1,4 +1,4 @@
FROM alpine:3.14 as builder FROM alpine:3.15 as builder
RUN apk --no-cache add \ RUN apk --no-cache add \
bash \ 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/aclocal-1.16 /usr/bin/aclocal-1.15
RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15 RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15
ENV RESTY_VERSION=1.19.3.2 ENV RESTY_VERSION=1.19.9.1
ENV RESTY_SHA256_SUM=ce40e764990fbbeb782e496eb63e214bf19b6f301a453d13f70c4f363d1e5bb9 ENV RESTY_SHA256_SUM=576ff4e546e3301ce474deef9345522b7ef3a9d172600c62057f182f3a68c1f6
RUN wget https://openresty.org/download/openresty-$RESTY_VERSION.tar.gz 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 echo "$RESTY_SHA256_SUM openresty-$RESTY_VERSION.tar.gz" | sha256sum -c - || exit 1

View File

@ -1 +0,0 @@
/var/lib/redis/ true redis 0640 0750

View File

@ -0,0 +1 @@
confd

View File

@ -1,4 +1,4 @@
#!/usr/bin/with-contenv sh #!/bin/sh
cd /app/server cd /app/server
s6-setuidgid syncer gin start s6-setuidgid syncer gin start

View File

@ -0,0 +1 @@
longrun

View File

@ -1,3 +1,3 @@
#!/usr/bin/with-contenv sh #!/bin/sh
exec s6-setuidgid redis redis-server /etc/redis.conf exec s6-setuidgid redis redis-server /etc/redis.conf

View File

@ -0,0 +1 @@
longrun