primeiro commit
This commit is contained in:
commit
4732ef9b55
31
.gitea/workflows/build.yaml
Normal file
31
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
name: Build and Push Image
|
||||
on: [ push ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and push image
|
||||
runs-on: ubuntu-latest
|
||||
container: catthehacker/ubuntu:act-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.aehoo.net
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
tags: |
|
||||
git.aehoo.net/alphard/znc:${{env.GITHUB_SHA}}
|
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@ -0,0 +1,31 @@
|
||||
FROM alpine:3.19 AS builder
|
||||
RUN apk add autoconf automake db-dev g++ gcc gzip heimdal-dev libtool make openldap-dev openssl-dev tar cyrus-sasl libldap
|
||||
RUN wget -O /tmp/cyrus-sasl.tar.gz https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.28/cyrus-sasl-2.1.28.tar.gz
|
||||
RUN mkdir -p /tmp/cyrus-sasl &&\
|
||||
tar -xzf /tmp/cyrus-sasl.tar.gz --strip=1 -C /tmp/cyrus-sasl &&\
|
||||
rm -f /tmp/cyrus-sasl.tar.gz
|
||||
RUN cd /tmp/cyrus-sasl &&\
|
||||
./configure \
|
||||
--prefix=/opt/cyrus-sasl \
|
||||
--disable-anon \
|
||||
--enable-cram \
|
||||
--enable-digest \
|
||||
--enable-ldapdb \
|
||||
--enable-login \
|
||||
--enable-ntlm \
|
||||
--disable-otp \
|
||||
--enable-plain \
|
||||
--with-gss_impl=heimdal \
|
||||
--with-devrandom=/dev/urandom \
|
||||
--with-ldap=/usr &&\
|
||||
make install
|
||||
|
||||
FROM alpine:edge
|
||||
COPY --from=builder /opt/cyrus-sasl /opt/cyrus-sasl
|
||||
COPY start /usr/local/bin/start
|
||||
COPY saslauthd.conf /etc/saslauthd.conf
|
||||
RUN apk update &&\
|
||||
apk add libldap heimdal-libs gdbm libsasl znc tini &&\
|
||||
chmod +x /usr/local/bin/start
|
||||
VOLUME ["/var/lib/znc"]
|
||||
ENTRYPOINT ["/sbin/tini","--","/usr/local/bin/start"]
|
5
saslauthd.conf
Normal file
5
saslauthd.conf
Normal file
@ -0,0 +1,5 @@
|
||||
ldap_servers:ldaps://diretorio.aehoo.net
|
||||
ldap_search_base: ou=People,dc=aehoo,dc=net
|
||||
ldap_timeout: 10
|
||||
ldap_filter: (uid=%u)
|
||||
ldap_version: 3
|
Loading…
Reference in New Issue
Block a user