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 6c26cff commit 09c3e15
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions Dockerfile
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"]

0 comments on commit 09c3e15

Please sign in to comment.