From 7508a4e2835f8593636680323116bd19f8f493bf Mon Sep 17 00:00:00 2001 From: Mathieu Date: Tue, 12 Oct 2021 21:23:17 +0200 Subject: [PATCH] Working final dockerfile using Ubuntu --- Dockerfile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e4db1c..fca8192 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,25 @@ -# THIS IS ONLY A TEST, NOT READY FOR PRODUCTION - FROM ubuntu:21.04 ENV DEBIAN_FRONTEND=noninteractive +ENV ENV_STATUS=${NODE_ENV:-production} -WORKDIR /jarvis-server +# For suport set local time zone. +RUN apt-get update -y && apt-get upgrade -y -RUN apt update && apt upgrade -y +WORKDIR /jarvis -RUN apt install python3.9 python3-pip python3.9-dev python3.9-distutils python3-fann2 libfann-dev swig git python3-levenshtein -y +RUN apt install python3.9 python3-pip python3.9-dev python3.9-distutils python3-fann2 libfann-dev swig git python3-levenshtein curl -y -RUN git clone --progress --verbose https://github.com/M4TH1EU/jarvis-server.git . +RUN git clone --branch $(curl --silent "https://api.github.com/repos/m4th1eu/jarvis-server/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') --progress --verbose https://github.com/M4TH1EU/jarvis-server.git . RUN python3 -m pip install -r requirements.txt +RUN apt-get clean -y + EXPOSE 5000 -ENTRYPOINT ["python3", "run.py"] \ No newline at end of file +COPY start.sh /jarvis/ + +RUN chmod +x start.sh + +CMD "./start.sh" \ No newline at end of file