-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
45 lines (34 loc) · 942 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
34
35
36
37
38
39
40
41
42
43
44
45
FROM python:3.9.5
ARG BUILD_GIT_BRANCH
ARG BUILD_GIT_COMMIT
ARG BUILD_GIT_AUTHOR
ARG BUILD_GIT_AUTHOR_NAME
ARG BUILD_GIT_REPO_LINK
ARG BUILD_CREATED
ARG BUILD_NUMBER
# add user csbs
RUN useradd -ms /bin/bash jacow
RUN mkdir -p /var/tmp
WORKDIR /home/jacow
COPY requirements.txt ./
RUN pip install -r requirements.txt
#RUN pip install pipenv
#COPY Pipfile* ./
#COPY setup.py ./
#RUN pipenv lock --requirements > requirements.txt
COPY .flaskenv boot.sh ./
COPY setup.py README.md ./
COPY migrations migrations
COPY spms spms
COPY wsgi.py ./
COPY src src
# uses the setup file to install the app to be able to run commandline commands defined in it. like flask db upgrade
RUN pip install -e .
# Store all build args env variables into a file for later use
RUN env | grep BUILD_ > build_envs.txt; exit 0
RUN chmod +x boot.sh
RUN chown -R jacow:jacow ./
RUN chown -R jacow:jacow /var/tmp
USER jacow
EXPOSE 5000
ENTRYPOINT ["./boot.sh"]