This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
42 lines (37 loc) · 1.61 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
LABEL maintainer="Ryan Kraus ([email protected])"
# setup third party install locations
ENV PYTHONPATH=/app/lib/python,/deps/python \
PYTHONUSERBASE=/deps/python \
ANSIBLE_COLLECTIONS_PATH=/deps/ansible \
PATH=/deps/python/bin:$PATH
RUN mkdir -p /deps/python /deps/ansible; \
chmod -Rv 755 /deps /deps/*
# Install dependencies
COPY version.txt /version.txt
COPY requirements.txt /deps/python_requirements.txt
COPY requirements.yml /deps/ansible_requirements.yml
RUN microdnf -y update; \
rpm --erase --nodeps coreutils-single; \
microdnf install coreutils; \
microdnf -y install python38 jq openssh-clients tar findutils less ncurses procps; \
python3 -m pip install --upgrade pip wheel; \
python3 -m pip install --user -r /deps/python_requirements.txt; \
ansible-galaxy collection install -r /deps/ansible_requirements.yml; \
microdnf clean all; \
rm -rf /var/cache/yum /tmp/* /root/.cache /usr/lib/python3.8/site-packages /usr/lib64/python3.8/__pycache__;
# Install application
WORKDIR /app
COPY app /app
COPY data.skel /data.skel
COPY home /root
# Initialize application
RUN rpm -i /app/tmp/ilorest-3.0.1-7.x86_64.rpm; \
chmod -Rv g-rwx /root/.ssh; chmod -Rv o-rwx /root/.ssh; \
rm -rf /app/tmp; \
cd /usr/local/bin; \
curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.8/openshift-client-linux.tar.gz | tar xvzf -; \
curl https://raw.githubusercontent.com/project-faros/farosctl/master/bin/farosctl > farosctl; \
chmod 755 farosctl;
ENTRYPOINT ["/app/bin/entry.sh"]
CMD ["/app/bin/run.sh"]