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
6c26cff
commit 09c3e15
Showing
1 changed file
with
6 additions
and
10 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,21 +1,17 @@ | ||
FROM ubuntu:latest | ||
FROM centos:7 | ||
|
||
# Install necessary packages | ||
RUN apt-get update && apt-get install -y wget rpm rpm-build rpmlint make coreutils diffutils patch python3 | ||
RUN yum -y update && yum -y upgrade && \ | ||
yum -y install wget rpm-build rpm-devel rpmlint make coreutils diffutils patch rpmdevtools make python | ||
|
||
# Create the rpm build directories | ||
RUN mkdir -p /root/rpmbuild/RPMS/noarch && \ | ||
mkdir -p /root/rpmbuild/SOURCES && \ | ||
mkdir -p /root/rpmbuild/SPECS && \ | ||
mkdir -p /root/rpmbuild/SRPMS | ||
|
||
# Copy source files and spec file | ||
|
||
COPY *.tar.gz /root/rpmbuild/SOURCES/ | ||
COPY *.patch /root/rpmbuild/SOURCES/ | ||
ADD tomcat.spec /root/rpmbuild/SPECS/ | ||
|
||
# Set working directory | ||
VOLUME /root/rpmbuild/RPMS/noarch | ||
WORKDIR /root/rpmbuild/RPMS/noarch | ||
|
||
# Command to build RPM | ||
CMD ["rpmbuild", "--target", "noarch", "-v", "-bb", "tomcat.spec"] | ||
CMD ["rpmbuild","--target","noarch","-v","-bb","tomcat.spec"] |