This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Containerfile-dev
70 lines (56 loc) · 1.96 KB
/
Containerfile-dev
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
62
63
64
65
66
67
68
69
70
FROM quay.io/fedora/fedora:37
LABEL maintainer="Red Hat Product Security Dev - Red Hat, Inc." \
vendor="Red Hat Product Security Dev - Red Hat, Inc." \
summary="Red Hat Product Security CLI." \
distribution-scope="public"
ARG PIP_INDEX_URL
ARG ROOT_CA_URL
ARG REQUESTS_CA_BUNDLE
ARG CORGI_SERVER_URL
ARG OSIDB_SERVER_URL
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=off \
PIP_INDEX_URL="${PIP_INDEX_URL}" \
REQUESTS_CA_BUNDLE="${REQUESTS_CA_BUNDLE}" \
ROOT_CA_URL="${ROOT_CA_URL}" \
CORGI_SERVER_URL="${CORGI_SERVER_URL}" \
OSIDB_SERVER_URL="${OSIDB_SERVER_URL}"
RUN cd /etc/pki/ca-trust/source/anchors/ && \
# The '| true' skips this step if the ROOT_CA_URL is unset or fails in another way
curl -O "${ROOT_CA_URL}" | true && \
update-ca-trust && \
cd -
RUN dnf --nodocs --setopt install_weak_deps=false -y install \
zsh \
cargo \
gcc \
git \
krb5-devel \
krb5-workstation \
libffi-devel \
make \
python3 \
python3-devel \
python3-pip \
python3-setuptools \
python3-wheel \
which \
&& dnf --nodocs --setopt install_weak_deps=false -y upgrade --security \
&& dnf clean all
# # TODO - this will be removed once we ship corgi_bindings to pypi
RUN pip3 install -e git+https://github.com/RedHatProductSecurity/component-registry-bindings#egg=component_registry_bindings
COPY ./files/.zshrc /root/.zshrc
WORKDIR /opt/app-root/src/
COPY ./requirements ./requirements
# Install Python package dependencies from requirements file passed in PIP_REQUIREMENT (local
# docker-compose may override this in the build step).
RUN pip3 install -r "./requirements/base.txt"
# Limit copied files to only the ones required to run the app
COPY ./*.sh ./*.py ./
COPY ./griffon ./griffon
COPY ./README.md ./README.md
COPY ./LICENSE ./LICENSE
RUN pip3 install .
RUN chgrp -R 0 /opt/app-root && \
chmod -R g=u /opt/app-root
ENTRYPOINT ["zsh"]