-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (24 loc) · 860 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
25
26
27
28
FROM registry.redhat.io/ubi8:latest
MAINTAINER Simon Reber <[email protected]>
USER root
# Copy entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement
# Copy subscription manager configurations
# COPY ./rhsm-conf /etc/rhsm
# COPY ./rhsm-ca /etc/rhsm/ca
# Delete /etc/rhsm-host to use entitlements from the build container
RUN rm /etc/rhsm-host && \
# Initialize /etc/yum.repos.d/redhat.repo
# See https://access.redhat.com/solutions/1443553
yum -v repolist --disablerepo=* && \
subscription-manager repos --enable rhel-8-for-x86_64-baseos-rpms && \
yum -v -y update && \
yum -v -y install python38 && \
# Remove entitlements and Subscription Manager configs
rm -rf /etc/pki/entitlement && \
rm -rf /etc/rhsm
ADD app.py /opt/
ADD run.sh /opt/
RUN chmod 755 /opt/app.py
RUN chmod 755 /opt/run.sh
CMD ["/opt/run.sh"]