Merge pull request #23 from grindsa/alma9

use almalinux as base image
This commit is contained in:
Naveenraj M
2025-01-30 14:14:46 +05:30
committed by GitHub

View File

@ -1,25 +1,18 @@
# Using CentOS 7 as base image to support rpmbuild (packages will be Dist el7) # Using almalinux:latest as base image for this container
FROM centos:7 FROM almalinux:latest
# Copying all contents of rpmbuild repo inside container # Copying all contents of rpmbuild repo inside container
COPY . . COPY . .
# Installing tools needed for rpmbuild , # Installing tools needed for rpmbuild ,
# depends on BuildRequires field in specfile, (TODO: take as input & install) # depends on BuildRequires field in specfile, (TODO: take as input & install)
RUN yum install -y rpm-build rpmdevtools gcc make coreutils python git RUN yum install -y rpm-build rpmdevtools gcc make python git nodejs yum-utils
# Setting up node to run our JS file
# Download Node Linux binary
RUN curl -O https://nodejs.org/dist/v12.16.1/node-v12.16.1-linux-x64.tar.xz
# Extract and install
RUN tar --strip-components 1 -xvf node-v* -C /usr/local
# Install dependecies and build main.js # Install dependecies and build main.js
RUN npm install --production \ RUN npm install --production \
&& npm run-script build && npm run-script build
# All remaining logic goes inside main.js , # All remaining logic goes inside main.js ,
# where we have access to both tools of this container and # where we have access to both tools of this container and
# contents of git repo at /github/workspace # contents of git repo at /github/workspace
ENTRYPOINT ["node", "/lib/main.js"] ENTRYPOINT ["node", "/lib/main.js"]