forked from HydrologicEngineeringCenter/TomcatRPM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c199ba5
commit 71fd918
Showing
1 changed file
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
FROM centos:7 | ||
|
||
RUN yum -y update && yum -y upgrade && \ | ||
yum -y install wget rpm-build rpm-devel rpmlint make coreutils diffutils patch rpmdevtools make python | ||
|
||
RUN mkdir -p /root/rpmbuild/RPMS/noarch && \ | ||
mkdir -p /root/rpmbuild/SOURCES && \ | ||
mkdir -p /root/rpmbuild/SPECS && \ | ||
mkdir -p /root/rpmbuild/SRPMS | ||
# Clean up and update yum, then install required packages | ||
RUN yum clean all && yum -y update -v && yum -y upgrade -v && \ | ||
yum -y install wget rpm-build rpm-devel rpmlint make coreutils diffutils patch rpmdevtools make python -v | ||
|
||
# Set up the build directories | ||
RUN mkdir -p /root/rpmbuild/{RPMS/noarch,SOURCES,SPECS,SRPMS} | ||
|
||
# Copy source and spec files | ||
COPY *.tar.gz /root/rpmbuild/SOURCES/ | ||
COPY *.patch /root/rpmbuild/SOURCES/ | ||
ADD tomcat.spec /root/rpmbuild/SPECS/ | ||
|
||
# Define the volume for the built RPMs | ||
VOLUME /root/rpmbuild/RPMS/noarch | ||
|
||
# Set the working directory | ||
WORKDIR /root/rpmbuild/RPMS/noarch | ||
CMD ["rpmbuild","--target","noarch","-v","-bb","tomcat.spec"] | ||
|
||
# Default command to build the RPM | ||
CMD ["rpmbuild", "--target", "noarch", "-v", "-bb", "/root/rpmbuild/SPECS/tomcat.spec"] |