-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
35 lines (28 loc) · 948 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
DOCKER_REPO ?= DOCKERHUB_USER/grafana-ldap-sync-script
DOCKER_TAG ?= v1.0
CONFIG_DIR ?= ${PWD}
init:
pip install -r requirements.txt
bundle:
rm grafana-ldap-sync-script.zip
zip grafana-ldap-sync-script.zip \
LICENSE \
README.md \
run.py \
requirements.txt \
config.yml \
example.csv \
script/* \
-x 'script/__pycache__**'
test:
nosetests tests
docker-build:
docker build -t ${DOCKER_REPO}:latest .
docker tag ${DOCKER_REPO}:latest ${DOCKER_REPO}:${DOCKER_TAG}
docker-push: docker-build
docker push ${DOCKER_REPO}:latest
docker push ${DOCKER_REPO}:${DOCKER_TAG}
docker-run: docker-build
docker run --mount 'type=bind,source=${CONFIG_DIR},target=/data' ${DOCKER_REPO}:${DOCKER_TAG} --config /data/config.yml --bind /data/example.csv --log-level=debug --dry-run
docker-explore: docker-build
docker run -it --entrypoint /bin/bash --mount 'type=bind,source=${CONFIG_DIR},target=/data' ${DOCKER_REPO}:${DOCKER_TAG} -o vi