forked from RedHatInsights/cicd-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 924 Bytes
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 924 Bytes
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
FROM registry.access.redhat.com/ubi9-minimal:9.7-1770267347
LABEL \
io.k8s.description=hcc-cicd-tools \
io.openshift.tags="" \
summary=hcc-cicd-tools
COPY image_build_scripts/* /setup/
ENV HOME=/tools
ENV TOOLS_DEP_LOCATION="$HOME/bin"
ENV KONFLUX_SCRIPTS_LOCATION="$HOME/konflux"
ENV PYTHON_VENV="$HOME/.venv"
ENV PATH="$PYTHON_VENV/bin:$TOOLS_DEP_LOCATION:$KONFLUX_SCRIPTS_LOCATION:$PATH"
# Run install_system_dependencies.sh and create user
RUN /setup/install_system_dependencies.sh && useradd -d "$HOME" tools
USER tools
WORKDIR "$HOME"
# Install python dependencies
RUN /setup/install_python_dependencies.sh
# Install third party dependencies
RUN /setup/install_third_party_tools.sh
# Copy konflux scripts
COPY konflux_scripts/* "$KONFLUX_SCRIPTS_LOCATION/"
# Copy local helper scripts
COPY bin/oc_wrapper "$TOOLS_DEP_LOCATION/"
USER 0
RUN chown -R tools:0 $HOME
RUN chmod -R g+rwx $HOME
USER tools