Initial commit
This commit is contained in:
commit
ac24e0be46
4 changed files with 86 additions and 0 deletions
22
.drone-manifest.yml
Normal file
22
.drone-manifest.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
image: nemunaire/saslauthd:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
- image: nemunaire/saslauthd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
- image: nemunaire/saslauthd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
||||
- image: nemunaire/saslauthd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
||||
variant: v7
|
36
.woodpecker.yaml
Normal file
36
.woodpecker.yaml
Normal file
|
@ -0,0 +1,36 @@
|
|||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
labels:
|
||||
platform: ${platform}
|
||||
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
- cron
|
||||
|
||||
steps:
|
||||
build-container:
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: nemunaire/saslauthd
|
||||
auto_tag: true
|
||||
auto_tag_suffix: "${platform%/*}-${platform#*/}"
|
||||
|
||||
publish-manifest:
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
spec: .drone-manifest.yml
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
8
Dockerfile
Normal file
8
Dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
|||
FROM debian:stable-slim
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["/usr/sbin/saslauthd", "-a", "ldap", "-O", "/etc/sasl2/saslauthd.conf"]
|
||||
|
||||
COPY entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y sasl2-bin libsasl2-modules-ldap && rm -rf /var/lib/apt/lists/*
|
20
entrypoint.sh
Executable file
20
entrypoint.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
cat <<EOF > /etc/sasl2/saslauthd.conf
|
||||
ldap_servers: ${LDAP_SERVERS}
|
||||
ldap_search_base: ${LDAP_SEARCH_BASE}
|
||||
ldap_scope: ${LDAP_SCOPE:-sub}
|
||||
ldap_filter: ${LDAP_FILTER}
|
||||
ldap_bind_dn: ${LDAP_BIND_DN}
|
||||
ldap_bind_pw: ${LDAP_BIND_PW}
|
||||
ldap_auth_method: ${LDAP_AUTH_METHOD:-bind}
|
||||
ldap_deref: ${LDAP_DEREF:-find}
|
||||
ldap_ssl: ${LDAP_SSL:-on}
|
||||
ldap_tls_cacert_dir: ${LDAP_TLS_CACERT_DIR:-/usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt}
|
||||
|
||||
ldap_group_attr: ${LDAP_GROUP_ATTR:-member}
|
||||
ldap_group_dn: ${LDAP_GROUP_DN}
|
||||
ldap_group_match_method: ${LDAP_GROUP_MATCH_METHOD:-attr}
|
||||
EOF
|
||||
|
||||
exec $@
|
Loading…
Add table
Add a link
Reference in a new issue