This repository was archived by the owner on Jan 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (48 loc) · 1.44 KB
/
Dockerfile
File metadata and controls
61 lines (48 loc) · 1.44 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Builder Stage
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7-923 as builder
ENV LANG=en_US.utf8
WORKDIR /opt/houndigrade
COPY poetry.lock .
COPY pyproject.toml .
RUN microdnf update \
&& microdnf install -y \
cargo \
gcc \
lvm2 \
openssl-devel \
python39-devel \
python39-pip \
udev \
util-linux \
&& if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3.9 /usr/bin/python; fi \
&& if [ ! -e /usr/bin/pip ]; then ln -s /usr/bin/pip3.9 /usr/bin/pip ; fi \
&& pip install -U pip \
&& pip install poetry tox \
&& poetry config virtualenvs.in-project true \
&& poetry install -n --no-dev
# Release Stage
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7-923 as release
ENV LANG=en_US.utf8
ENV VIRTUAL_ENV=/opt/houndigrade/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
WORKDIR /opt/houndigrade
RUN microdnf update \
&& microdnf install -y \
util-linux \
lvm2 \
python39 \
udev \
&& if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3.9 /usr/bin/python; fi \
&& if [ ! -e /usr/bin/pip ]; then ln -s /usr/bin/pip3.9 /usr/bin/pip ; fi \
&& mkdir -p /mnt/inspect
COPY --from=builder /opt/houndigrade .
COPY houndigrade/cli.py .
ENTRYPOINT ["python", "cli.py"]
CMD ["--help"]
# PR Check Stage
FROM builder as pr_check
COPY tox.ini .
COPY houndigrade/ houndigrade/
RUN tox
# Declare "default" stage.
FROM release