use new s6-rc layout [skip CI]
This commit is contained in:
parent
ef2904e513
commit
631cb25eff
@ -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
|
@ -1,13 +1,18 @@
|
||||
variables:
|
||||
IMAGE_NAME: thallian/postfix-ldap
|
||||
CONTAINER_NAME: thallian/postfix
|
||||
|
||||
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"
|
||||
|
16
Dockerfile
16
Dockerfile
@ -1,21 +1,5 @@
|
||||
FROM alpine:3.14 as builder
|
||||
|
||||
RUN apk add --no-cache \
|
||||
g++ \
|
||||
make \
|
||||
libmilter-dev \
|
||||
spamassassin-client
|
||||
|
||||
RUN mkdir /tmp/spamass-milter
|
||||
RUN wget -qO- https://download.savannah.gnu.org/releases/spamass-milt/spamass-milter-0.4.0.tar.gz | tar -xz -C /tmp/spamass-milter --strip 1
|
||||
WORKDIR /tmp/spamass-milter
|
||||
|
||||
RUN ./configure && make
|
||||
|
||||
FROM thallian/confd-env:latest
|
||||
|
||||
COPY --from=builder /tmp/spamass-milter/spamass-milter /bin/spamass-milter
|
||||
|
||||
RUN apk add --no-cache \
|
||||
postfix \
|
||||
postfix-pgsql \
|
||||
|
@ -16,6 +16,10 @@ create table if not exists virtual_aliases (
|
||||
source text not null,
|
||||
destination text not null
|
||||
);
|
||||
|
||||
create table if not exists virtual_senders (
|
||||
email text not null references virtual_users(email)
|
||||
);
|
||||
```
|
||||
|
||||
# Volumes
|
||||
|
4
rootfs/bin/aliases
Executable file
4
rootfs/bin/aliases
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
newaliases
|
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
set -e
|
||||
|
||||
newaliases
|
||||
|
1
rootfs/etc/s6-overlay/s6-rc.d/aliases/type
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/aliases/type
Normal file
@ -0,0 +1 @@
|
||||
oneshot
|
1
rootfs/etc/s6-overlay/s6-rc.d/aliases/up
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/aliases/up
Normal file
@ -0,0 +1 @@
|
||||
aliases
|
2
rootfs/etc/s6-overlay/s6-rc.d/postfix/dependencies
Normal file
2
rootfs/etc/s6-overlay/s6-rc.d/postfix/dependencies
Normal file
@ -0,0 +1,2 @@
|
||||
confd
|
||||
aliases
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /var/spool/postfix/etc
|
||||
cp /etc/resolv.conf /var/spool/postfix/etc/resolv.conf
|
1
rootfs/etc/s6-overlay/s6-rc.d/postfix/type
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/postfix/type
Normal file
@ -0,0 +1 @@
|
||||
longrun
|
Loading…
Reference in New Issue
Block a user