Skip to content

Commit 6136e2c

Browse files
committed
added dockerfile and docker make steps
1 parent 71e6b9f commit 6136e2c

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.yml
2+
*.csv
3+
script/__pycache__**

Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM python:3.9-slim
2+
3+
COPY requirements.txt /requirements.txt
4+
5+
RUN pip install -r /requirements.txt
6+
7+
ADD LICENSE run.py script/* /
8+
9+
ENTRYPOINT [ "python3", "/run.py" ]

Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
DOCKER_REPO ?= bushelpowered/grafana-ldap-sync-script
2+
DOCKER_TAG ?= v1.0
3+
14
init:
25
pip install -r requirements.txt
36

@@ -15,3 +18,11 @@ bundle:
1518

1619
test:
1720
nosetests tests
21+
22+
docker-build:
23+
docker build -t ${DOCKER_REPO}:latest .
24+
docker tag ${DOCKER_REPO}:latest ${DOCKER_REPO}:${DOCKER_TAG}
25+
26+
docker-push: docker-build
27+
docker push ${DOCKER_REPO}:latest
28+
docker push ${DOCKER_REPO}:${DOCKER_TAG}

0 commit comments

Comments
 (0)