openldap_docker/Makefile
2024-01-29 16:52:14 +03:30

24 lines
529 B
Makefile

.PHONY: prepare_mounts
prepare_mounts: clean
mkdir ldap-data
sudo chown -R 101:101 ldap-data
.PHONY: clean
clean:
sudo rm -rf ldap-data
.PHONY: build
build: clean
docker build -t rbehzadan/openldap:1.0.1 .
.PHONY: run
run: prepare_mounts
docker run --rm -p 389:389 --name openldap \
-e LDAP_ROOTPASS="Sinic1234" \
-e LDAP_ORGANISATION="sinic" \
-e LDAP_DOMAIN="sinic.ir" \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
-v "`pwd`/ldap-data:/var/lib/ldap" \
rbehzadan/openldap:1.0.1