0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/docker-examples/ldap-verdaccio-v4
Juan Picado 04b19262d0 docs: relocate docker-examples to 5.x (#1990)
* docs: relocate docker-examples to 5.x

* chore: update readme

* chore: remove license

we have already one at root
2021-04-09 17:54:24 +02:00
..
conf docs: relocate docker-examples to 5.x (#1990) 2021-04-09 17:54:24 +02:00
docker/ldap/ldif_files docs: relocate docker-examples to 5.x (#1990) 2021-04-09 17:54:24 +02:00
storage/@scope/example docs: relocate docker-examples to 5.x (#1990) 2021-04-09 17:54:24 +02:00
verdaccio-ldap docs: relocate docker-examples to 5.x (#1990) 2021-04-09 17:54:24 +02:00
docker-compose.yaml docs: relocate docker-examples to 5.x (#1990) 2021-04-09 17:54:24 +02:00
readme.md docs: relocate docker-examples to 5.x (#1990) 2021-04-09 17:54:24 +02:00

Verdaccio and OpenLDAP Server

Running verdaccio with the plugin https://github.com/Alexandre-io/verdaccio-ldap.

Introduction

This example is based on:

It provides a published package named @scope/example that only authenticated users can access.

packages:
  '@scope/*':
    access: marpontes zach leonardo
    publish: $authenticated
    proxy: npmjs
  '@*/*':
    access: $all
    publish: $authenticated
    proxy: npmjs
  '**':
    access: $all
    publish: $authenticated
    proxy: npmjs

Usage

To run the containers, run the following command in this folder, it should starts the containers in detach mode.

➜ docker-compose up --force-recreate --build

Building verdaccio
Step 1/4 : FROM verdaccio/verdaccio:4.2.2
 ---> 0d58a1eae16d
Step 2/4 : USER root
 ---> Using cache
 ---> fb3300bf15cc
Step 3/4 : RUN npm i && npm i verdaccio-ldap
 ---> Using cache
 ---> 97701fa53b43
Step 4/4 : USER verdaccio
 ---> Using cache
 ---> fd5ddaa03d8f
Successfully built fd5ddaa03d8f
Successfully tagged ldap-verdaccio_verdaccio:latest
Recreating verdaccio-ldap-1 ... done
Recreating openldap         ... done
Recreating ldap-verdaccio_openldap-seed_1 ... done
Recreating openldap-admin                 ... done
Attaching to verdaccio-ldap-1, openldap, ldap-verdaccio_openldap-seed_1, openldap-admin
verdaccio-ldap-1  |  warn --- config file  - /verdaccio/conf/config.yaml
verdaccio-ldap-1  |  warn --- Plugin successfully loaded: verdaccio-ldap
verdaccio-ldap-1  |  warn --- http address - http://0.0.0.0:4873/ - verdaccio/4.2.2
openldap          | *** CONTAINER_LOG_LEVEL = 3 (info)
openldap          | *** Search service in CONTAINER_SERVICE_DIR = /container/service :
openldap          | *** link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
openldap          | *** link /container/service/slapd/startup.sh to /container/run/startup/slapd
openldap          | *** link /container/service/slapd/process.sh to /container/run/process/slapd/run
openldap          | *** Set environment for startup files
openldap          | *** Environment files will be proccessed in this order :
openldap          | Caution: previously defined variables will not be overriden.
openldap          | /container/environment/99-default/default.yaml
openldap          | /container/environment/99-default/default.startup.yaml

To stop all containers

docker-compose stop

Credentials

You can find the complete list of users in the people.ldif file. However here a brief list of credentials.

marpontes: pass
zach: pass
leonardo: pass