dex Docker & Self-Hosted Deployment

GitHub

OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors

10,994 stars Go Go 1 file ยท ~3,100 tokens #hacktoberfest#identity-provider#idp#kubernetes#oidc
RAW Compose
1. Pull Image (DOCKERHUB) docker pull osixia/openldap
2. Docker Run (1-Click Launch) docker run -d --name dex -p 389:389 --restart always osixia/openldap:1.4.0
3. Podman Run podman run -d --name dex -p 389:389 --restart always osixia/openldap:1.4.0
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/osixia/openldap:1.4.0
5. ORAS Pull (OCI Artifact) oras pull osixia/openldap:1.4.0
6. Compose Deployment docker compose up -d
examples/ldap/docker-compose.yaml
Download .yml
version: "3"

# For LDAPS with certificate validation:
# How to extract the TLS certificate from the OpenLDAP container, and encode it for the Dex config (`rootCAData`):
#   $ docker-compose exec ldap cat /container/run/service/slapd/assets/certs/ca.crt | base64 -w 0
# But note this issue: https://github.com/osixia/docker-openldap/issues/506

services:
  ldap:
    image: osixia/openldap:1.4.0
    # Copying is required because the entrypoint modifies the *.ldif files.
    # For verbose output, use:  command: ["--copy-service", "--loglevel", "debug"]
    command: ["--copy-service"]
    environment:
      # Required if using LDAPS:
      # Since Dex doesn't use a client TLS certificate, downgrade from "demand" to "try".
      LDAP_TLS_VERIFY_CLIENT: try
    # The hostname is required if using LDAPS with certificate validation.
    # In Dex, use the same hostname (with port) for `connectors[].config.host`.
    #hostname: YOUR-HOSTNAME
    #
    # https://github.com/osixia/docker-openldap#seed-ldap-database-with-ldif
    # Option 1: Add custom seed file -> mount to         /container/service/slapd/assets/config/bootstrap/ldif/custom/
    # Option 2: Overwrite default seed file -> mount to  /container/service/slapd/assets/config/bootstrap/ldif/
    volumes:
    - ./config-ldap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/config-ldap.ldif
    ports:
    - 389:389
    - 636:636