-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
42 lines (31 loc) · 984 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
#Tag ubi8 image to make it available in cluster -- oc tag --source=docker registry.redhat.io/ubi8/ubi:latest ubi8:latest -n openshift
FROM image-registry.openshift-image-registry.svc:5000/openshift/ubi8
#FROM registry.redhat.io/ubi8/ubi:latest
#ENV Variables
ENV APP_MODULE runapp:app
ENV APP_CONFIG gunicorn/gunicorn.conf.py
ENV APP_SCRIPT ./runapp.sh
ENV DOCKERFILE_RUN true
# Install the required software
RUN yum update -y && yum install git python38 -y
# Install pip
#RUN curl -O https://bootstrap.pypa.io/pip/3.6/get-pip.py && python3 get-pip.py && python3 get-pip.py
#Make Application Directory
RUN mkdir ./app && cd ./app
# Copy Files into containers
COPY ./ ./app
#WORKDIR
WORKDIR ./app
# Install App Dependecies
RUN pip3.8 install -r requirements.txt
#Expose Ports
#Web Port
EXPOSE 8080/tcp
#Debug Port
EXPOSE 5679/tcp
#Change Permissions to allow not root-user work
RUN chmod -R g+rw ./ && chmod +x runapp.sh
#Change User
USER 1001
#ENTRY
ENTRYPOINT $APP_SCRIPT