Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCaronJr authored Jul 31, 2024
1 parent c199ba5 commit 71fd918
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Dockerfile
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"]

0 comments on commit 71fd918

Please sign in to comment.