-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (28 loc) · 1.01 KB
/
Dockerfile
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
ARG PY_VER=3.8.0
FROM python:${PY_VER} AS sqlqeurygraph-py
## Add the wait script to the image
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /wait
# download pipenv so can create requirements.txt
# for faster environment recreation
# https://pythonspeed.com/articles/pipenv-docker/
RUN pip install --upgrade pip \
&& pip install poetry
COPY poetry.lock ./tmp
COPY pyproject.toml ./
RUN poetry export -f requirements.txt -o requirements.txt
# move relevant folders and files from local to container
COPY ./example ./example
COPY sqlquerygraph.py ./
COPY exporter.py ./
COPY extractor.py ./
COPY writer.py ./
COPY loader.py ./
# install package for loader and give it executable rights
RUN pip install -r requirements.txt \
&& mkdir log \
&& mkdir data \
&& mkdir neo4j \
&& python sqlquerygraph.py -sd 'example/sql' -ed 'example/neo4j' -rd 'github_repos' 'analytics' 'reporting' \
&& chmod +x /wait
# move relevant files so they can be executed
COPY ./neo4j/*.cypher ./data