contrib/openldap: add a OpenLDAP container for testing
This commit is contained in:
36
contrib/openldap/Makefile
Normal file
36
contrib/openldap/Makefile
Normal file
@@ -0,0 +1,36 @@
|
||||
image=quay.io/coreos/openldap:2.4.44
|
||||
image_file=assets/openldap_2_4_44.docker
|
||||
|
||||
aci_file=quay.io-coreos-openldap-2.4.44.aci
|
||||
|
||||
$(shell mkdir -p assets)
|
||||
|
||||
user=$(shell id -u -n)
|
||||
group=$(shell id -g -n)
|
||||
|
||||
.PHONY: build
|
||||
build: $(image_file)
|
||||
|
||||
$(image_file): assets/openldap-2.4.44.tgz Dockerfile scripts/entrypoint.sh
|
||||
sudo docker build -t $(image) .
|
||||
sudo docker save -o $(image_file) $(image)
|
||||
# Change ownership of the container.
|
||||
sudo chown $(user):$(group) $(image_file)
|
||||
|
||||
assets/openldap-2.4.44.tgz: scripts/download.sh
|
||||
./scripts/download.sh
|
||||
|
||||
$(aci_file): $(image_file)
|
||||
docker2aci $(image_file)
|
||||
mv $(aci_file) assets/$(aci_file)
|
||||
|
||||
.PHONY: import-aci
|
||||
import-aci: $(aci_file)
|
||||
sudo rkt fetch --insecure-options=image ./assets/quay.io-coreos-openldap-2.4.44.aci
|
||||
|
||||
clean:
|
||||
rm -rf assets/*
|
||||
|
||||
.PHONY: push
|
||||
push:
|
||||
sudo docker push quay.io/coreos/openldap:2.4.44
|
Reference in New Issue
Block a user