File tree Expand file tree Collapse file tree 5 files changed +101
-81
lines changed Expand file tree Collapse file tree 5 files changed +101
-81
lines changed Original file line number Diff line number Diff line change 1
1
Dockerfile
2
2
Dockerfile-tools
3
+ Pipfile.lock
4
+
Original file line number Diff line number Diff line change 1
- FROM registry.access.redhat.com/ubi8:8.3
1
+ FROM registry.access.redhat.com/ubi8/python-39:1
2
2
3
- WORKDIR /app
3
+ WORKDIR /opt/ app-root/src
4
4
5
- COPY Pipfile* /app/
5
+ COPY Pipfile* /opt/ app-root/src /
6
6
7
7
# # NOTE - rhel enforces user container permissions stronger ##
8
8
USER root
9
- RUN yum -y install python3
10
- RUN yum -y install python3-pip wget
11
9
12
10
RUN python3 -m pip install --upgrade pip \
13
11
&& python3 -m pip install --upgrade pipenv \
14
- && pipenv install --system --deploy
12
+ && pipenv install --deploy
13
+
14
+ RUN pipenv lock -r > requirements.txt && pip3 install -r requirements.txt
15
15
16
16
USER 1001
17
17
18
- COPY . /app
18
+ COPY . /opt/ app-root/src
19
19
ENV FLASK_APP=server/__init__.py
20
20
ENV PORT 3000
21
21
Original file line number Diff line number Diff line change 1
1
# Use base UBI image
2
- FROM registry.access.redhat.com/ubi8/ubi
2
+ FROM registry.access.redhat.com/ubi8/python-39:1
3
3
4
- WORKDIR /app
4
+ WORKDIR /opt/ app-root/src
5
5
6
- COPY Pipfile* /app/
6
+ COPY Pipfile* /opt/ app-root/src /
7
7
8
- # Install python3
9
- RUN yum -y install --disableplugin=subscription-manager python36 \
10
- && yum --disableplugin=subscription-manager clean all
11
8
12
- RUN yum -y install --disableplugin=subscription-manager python3-pip wget \
9
+ RUN yum -y install --disableplugin=subscription-manager wget \
13
10
&& yum --disableplugin=subscription-manager clean all
14
11
15
12
RUN pip3 install pipenv
16
- RUN pipenv install
13
+ RUN pipenv install --deploy
14
+ RUN pipenv lock -r > requirements.txt && pip3 install -r requirements.txt
17
15
18
16
# Update python command to point to python3 install
19
17
RUN alternatives --set python /usr/bin/python3
20
18
21
19
ENV FLASK_APP=server/__init__.py
22
20
ENV FLASK_DEBUG=true
23
21
24
- COPY . /app
22
+ COPY . /opt/ app-root/src
25
23
COPY run-dev /bin
26
24
RUN chmod 777 /bin/run-dev
27
25
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ url = "https://pypi.org/simple"
4
4
verify_ssl = true
5
5
6
6
[dev-packages ]
7
+ livereload = " *"
7
8
8
9
[packages ]
9
10
gunicorn = " ==20.1.0"
10
11
ibmcloudenv = " *"
11
- livereload = " *"
12
12
flask = " >=1.0.0"
13
13
prometheus_client = " *"
14
14
flasgger = " *"
You can’t perform that action at this time.
0 commit comments