-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.el7
More file actions
23 lines (15 loc) · 802 Bytes
/
Dockerfile.el7
File metadata and controls
23 lines (15 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM centos:centos7
# FROM centos:centos8
LABEL maintainer="G. Dees <garrettdees@gmail.com>"
RUN yum -y install rpmdevtools rpm-build redhat-rpm-config make gcc rpmlint mock gettext wget
RUN useradd worker -u 1000 -G users,mock -p rpmbuild
# RUN yum -y install rpmdevtools rpm-build redhat-rpm-config make gcc gettext wget
# RUN useradd worker -u 1000 -G users -p rpmbuild
USER worker
WORKDIR /home/worker
RUN mkdir -p /home/worker/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
RUN echo "%_topdir /home/worker/rpmbuild" > /home/worker/.rpmmacros
RUN wget -O /home/worker/rpmbuild/SOURCES/hello-2.10.tar.gz \
http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
COPY --chown=worker:users ./hello.spec /home/worker/rpmbuild/SPECS
CMD [ "rpmbuild", "-ba", "/home/worker/rpmbuild/SPECS/hello.spec" ]