-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (33 loc) · 1.44 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.redhat.io/ubi8/ubi
MAINTAINER [email protected]
LABEL summary="RHEL8 base reposync image"
### Timezone
ENV TZ=Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#ENV container oci
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN mkdir -p /repo1 > /dev/null
### Package Update
RUN yum update -y > /dev/null
### Package Install
RUN yum install cronie createrepo yum-utils procps-ng -y > /dev/null
RUN yum repolist --disablerepo=* && \
yum-config-manager --disable \* > /dev/null && \
yum-config-manager --enable openstack-16-for-rhel-8-x86_64-rpms --enable openstack-16.1-for-rhel-8-x86_64-rpms --enable fast-datapath-for-rhel-8-x86_64-rpms --enable rhceph-4-tools-for-rhel-8-x86_64-rpms --enable advanced-virt-for-rhel-8-x86_64-rpms > /dev/null
RUN yum clean all -y > /dev/null
### Cron Setting
# Seems like a container specific issue on Centos: https://github.com/CentOS/CentOS-Dockerfiles/issues/31
RUN sed -i '/session required pam_loginuid.so/d' /etc/pam.d/crond
### Cron Add
ADD start-cron.txt /tmp/start-cron.txt
RUN crontab /tmp/start-cron.txt
RUN rm -f /tmp/start-cron.txt
### reposync file Add
RUN mkdir -p /root/reposync
ADD rhel8_reposync.sh /root/reposync
ADD rhel8_channel.txt /root/reposync
RUN chmod +x /root/reposync/rhel8_reposync.sh
##custom entry point — needed by cron
COPY entrypoint /entrypoint
RUN chmod +x /entrypoint
ENTRYPOINT ["/entrypoint"]