-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
50 lines (36 loc) · 1.22 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
43
44
45
46
47
48
49
50
FROM oraclelinux:8
# set working directory
WORKDIR /app
# add globalnoc and epel repos
RUN dnf install -y \
https://build.grnoc.iu.edu/repo/rhel/8/x86_64/globalnoc-release-8-1.el8.noarch.rpm \
oracle-epel-release-el8
# enable additional ol8 repos
RUN yum-config-manager --enable \
ol8_appstream ol8_baseos_latest ol8_codeready_builder \
ol8_developer_EPEL ol8_developer_EPEL_modular
# run makecache
RUN dnf makecache
# install venv dependencies
RUN dnf install -y \
openssl-devel perl-App-cpanminus expat-devel rpm-build mod_perl mod_perl-devel gcc
RUN cpanm Carton
# copy everything in
COPY . /app
# build & install rpm
RUN perl Makefile.PL
RUN make rpm
FROM oraclelinux:8
COPY --from=0 /root/rpmbuild/RPMS/x86_64/grnoc-tsds-aggregate*x86_64.rpm /root/
RUN dnf install -y \
https://build.grnoc.iu.edu/repo/rhel/8/x86_64/globalnoc-release-8-1.el8.noarch.rpm \
oracle-epel-release-el8
# enable additional ol8 repos
RUN yum-config-manager --enable \
ol8_appstream ol8_baseos_latest ol8_codeready_builder \
ol8_developer_EPEL ol8_developer_EPEL_modular
# run makecache
RUN dnf makecache
RUN dnf install -y /root/grnoc-tsds-aggregate*.rpm
# set entrypoint
ENTRYPOINT ["/bin/echo", "'Welcome to TSDS!'"]