-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
24 lines (17 loc) · 934 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
FROM registry.access.redhat.com/ubi9/python-312@sha256:d1244378f7ab72506d8d91cadebbf94c893c2828300f9d44aee4678efec62db9 as gen_ref_indexes
WORKDIR /code
COPY ./dev-requirements/references.txt ./references.txt
COPY ./scripts/gen_ref_index.py ./gen_ref_index.py
RUN python -m pip install -r ./references.txt && \
python ./gen_ref_index.py default --out-dir ./indexes
FROM registry.access.redhat.com/ubi9/python-312@sha256:d1244378f7ab72506d8d91cadebbf94c893c2828300f9d44aee4678efec62db9
WORKDIR /reinhard
COPY ./reinhard ./reinhard
COPY ./dev-requirements/constraints.txt ./requirements.txt
COPY ./main.py ./main.py
COPY --from=gen_ref_indexes /code/indexes ./indexes
ENV DOCKER_DEBUG=false
ENV REINHARD_INDEX_DIR=./indexes
RUN python -m pip install --no-cache-dir wheel && \
python -m pip install --no-cache-dir -r requirements.txt
ENTRYPOINT if ${DOCKER_DEBUG} == false; then python main.py; else python -O main.py; fi