Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions .github/workflows/build-image.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and Push Docker Image

on:
push:
branches:
- main
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 2 additions & 1 deletion image/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ create_global_var()
export KRB_ADMIN_PASSWORD=${KRB_ADMIN_PASSWORD:-admin}

export KRB_REALM=${KRB_REALM:-EXAMPLE.COM}
export DOMAIN_NAME=$(to_lower "$KRB_REALM")
export DOMAIN_NAME=${DOMAIN_NAME:-$(to_lower "$KRB_REALM")}
export LDAP_DN=$(create_dn "$KRB_REALM")
export LDAP_ORGANISATION=${LDAP_ORGANISATION:-EXAMPLE.COM}

Expand Down Expand Up @@ -79,6 +79,7 @@ configuration() {
replace_file "/container/config-slapd.sh";
debug_echo "Launching configuration";
/container/config-slapd.sh;
mkdir -p /var/run/slapd && chown openldap:openldap /var/run/slapd;
/usr/sbin/slapd -h "ldapi:// ldap://" -u openldap -g openldap;
sleep 10;
/container/config-openldap.sh
Expand Down
7 changes: 4 additions & 3 deletions image/schemas/add/06-ldap_groups.ldif
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ dn: ou=Groups,{{ LDAP_DN }}
objectClass: organizationalUnit
ou: Groups

dn: cn=storers,ou=Groups,{{ LDAP_DN }}
dn: cn=Employees,ou=Groups,{{ LDAP_DN }}
objectClass: top
objectClass: posixGroup
cn: storers
gidNumber: 10001
cn: Employees
gidNumber: 100
9 changes: 9 additions & 0 deletions image/schemas/add/09-add_microsoft_schema.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dn: cn=microsoft,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: microsoft
olcAttributeTypes: ( 1.2.840.113556.1.4.656
NAME 'userPrincipalName'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX '1.3.6.1.4.1.1466.115.121.1.15'
SINGLE-VALUE )