-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (31 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
43 lines (31 loc) · 1.04 KB
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
FROM registry.access.redhat.com/ubi9:9.1.0-1782
# #ENV Variables
# ENV APP_MODULE testapp:app
# ENV APP_CONFIG gunicorn.conf.py
#Change User
USER 0
# Install the required software
RUN dnf install -y wget yum-utils make gcc openssl-devel bzip2-devel libffi-devel zlib-devel && \
wget https://www.python.org/ftp/python/3.13.2/Python-3.13.2.tgz && \
tar xzf Python-3.13.2.tgz && \
cd Python-3.13.2 && \
./configure --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions && \
make altinstall && \
cd .. && \
rm Python-3.13.2.tgz
# # Install pip
# RUN curl -O https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && python3 get-pip.py
#Make Application Directory
RUN mkdir ./app && cd ./app && echo python -V
# Copy Files into containers
COPY ./ ./app
#WORKDIR
WORKDIR ./app
#Install App Dependecies
RUN pip3.13 install -r requirements.txt && pip3.13 install --upgrade pip
#Expose Ports
EXPOSE 8080/tcp
#Change Permissions to allow not root-user work
RUN chmod -R g+rw ./
#ENTRY
ENTRYPOINT python3.13 app.py