-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
31 lines (22 loc) · 967 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
# UBI with Python 3.8 version, see base Dockerfile here:
# https://catalog.redhat.com/software/containers/ubi8/python-38/5dde9cacbed8bd164a0af24a?gti-tabs=unauthenticated&container-tabs=dockerfile
FROM registry.access.redhat.com/ubi8/python-38:latest
LABEL MAINTAINER "Avishkar Gupta <[email protected]>"
EXPOSE 6006
# Upgrade dependency management itself.
RUN pip install --upgrade pip pipenv
# Copy the sources to the app root, see base image Dockerfile for more details.
WORKDIR /opt/app-root/src/
COPY ./src/ .
# Copy the locked env since this is a production build.
COPY ./Pipfile Pipfile
COPY ./Pipfile.lock Pipfile.lock
COPY ./entrypoint.sh entrypoint.sh
COPY ./gunicorn.conf.py gunicorn.conf.py
# Set the Pythonpath to the sources root.
ENV PYTHONPATH="/opt/app-root/"\
PIPENV_HIDE_EMOJIS="true" \
VIRTUAL_ENV="/opt/app-root/"
# Install application dependencies.
RUN pipenv install --deploy --ignore-pipfile
ENTRYPOINT [ "./entrypoint.sh" ]