Skip to content

Commit

Permalink
add automatic dependency install
Browse files Browse the repository at this point in the history
  • Loading branch information
shadichy committed Feb 11, 2024
1 parent f114749 commit 800287d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM centos:7
FROM centos:8

RUN yum groupinstall -y "Development Tools" && \
yum install -y \
RUN dnf groupinstall -y "Development Tools" && \
dnf install -y \
kernel-devel \
kernel-headers

Expand Down
6 changes: 4 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ fi
readonly RPMBUILD_DIR="$HOME/rpmbuild"
readonly RPMBUILD_SOURCE_DIR="$RPMBUILD_DIR/SOURCES"
readonly RPMBUILD_SPEC_DIR="$RPMBUILD_DIR/SPECS"
(
{
dnf install -y $INPUT_BUILD_REQUIRES
dnf install -y $INPUT_REQUIRES
readonly WORKDIR="/tmp/work"
mkdir "$WORKDIR"
cp /template.spec "$WORKDIR"
Expand All @@ -41,7 +43,7 @@ readonly RPMBUILD_SPEC_DIR="$RPMBUILD_DIR/SPECS"
cp -p template.spec "$RPMBUILD_SPEC_DIR"
cat template.spec
rpmbuild -bb "$RPMBUILD_SPEC_DIR/template.spec"
)
}

cp -p "$RPMBUILD_DIR/RPMS/$(uname -m)"/*.rpm .

Expand Down

0 comments on commit 800287d

Please sign in to comment.