diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ade5c44 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM python:3.10.6-buster + +ENV POETRY_VERSION=1.7.1 + +RUN apt-get update && apt-get install -y \ + python3-requests \ + python3-pip \ + curl \ + && rm -rf /var/lib/apt/lists/* + +COPY pyproject.toml . +COPY ontologytimemachine /ontologytimemachine +COPY README.md /README.md + +RUN python3 -m pip install --upgrade pip + +RUN pip install poetry==$POETRY_VERSION +RUN poetry config virtualenvs.create false +RUN poetry install --no-dev && rm pyproject.toml + + +CMD python3 -m proxy --hostname 0.0.0.0 --port $PORT --plugins ontologytimemachine.custom_proxy.OntologyTimeMachinePlugin + diff --git a/README.md b/README.md index 1ccec53..48db33d 100644 --- a/README.md +++ b/README.md @@ -1 +1,6 @@ -# ontology-time-machine \ No newline at end of file +# ontology-time-machine + + +Docker command: +- docker build -t ontology_time_machine:0.1 . +- docker run -d -e PORT=8899 -p 8182:8899 ontology_time_machine:0.1 \ No newline at end of file diff --git a/tests/test_proxy.py b/tests/test_proxy.py index b646c4b..980cee9 100644 --- a/tests/test_proxy.py +++ b/tests/test_proxy.py @@ -17,7 +17,7 @@ def start_proxy_server(): [ 'python3', '-m', 'proxy', '--hostname', IP, - '--port', str(PORT), + '--port', PORT, '--plugins', 'ontologytimemachine.custom_proxy.OntologyTimeMachinePlugin' ], stdout=subprocess.PIPE,