face-recognition-app/face_recognition/Dockerfile

14 lines
553 B
Docker
Raw Normal View History

2019-05-23 11:54:31 +00:00
FROM python:3.6
#copy requirements file and install required libraries. CMake is installed seperately because it is needed for face recognition and the way pip installs the requirements file fails as CMake isnt installed in time
2019-05-23 11:54:31 +00:00
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app
2019-06-08 16:59:42 +00:00
RUN pip install CMake
2019-05-23 11:54:31 +00:00
RUN pip install -r requirements.txt
RUN rm requirements.txt
#make new user so the container duesnt run using root, then copy the api and start it
2019-05-23 11:54:31 +00:00
RUN useradd -ms /bin/bash admin
USER admin
2019-06-08 17:23:27 +00:00
COPY /app .
2019-05-23 11:54:31 +00:00
ENTRYPOINT [ "python" ]
CMD [ "app.py" ]