-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (22 loc) · 826 Bytes
/
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
FROM python:3.9
MAINTAINER openHPI Team <[email protected]>
# Install dependencies for opencv
RUN apt-get update \
&& apt-get install -y python3-opencv \
&& rm -rf /var/lib/apt/lists/*
# Use eventlet 0.30.2 for now, since wsgi.ALREADY_HANDLED was removed in 0.30.3
RUN pip install --no-cache pipenv gunicorn greenlet eventlet==0.30.2 gunicorn[eventlet]
ENV APP_HOME /transpipe
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
# create the app user
RUN adduser --disabled-password --gecos Transpipe transpipe
COPY Pipfile Pipfile.lock entrypoint.sh $APP_HOME/
RUN pipenv requirements > requirements.txt
RUN pip install --no-cache -r requirements.txt
COPY pipeline $APP_HOME/
# chown all the files to the app user
RUN chown -R transpipe $APP_HOME
# change to the app user
USER transpipe
ENTRYPOINT ["./entrypoint.sh"]