pkg-fetch/Dockerfile.linux
2024-09-10 11:25:22 +02:00

38 lines
991 B
Docker

FROM oraclelinux:8 AS build
USER root:root
WORKDIR /root/pkg-fetch/
# Install required tools and enable the necessary repositories
RUN dnf install -y oracle-epel-release-el8 oraclelinux-developer-release-el8
# Enable the developer repo for devtoolset and python36
RUN dnf config-manager --enable ol8_UEKR6 ol8_addons ol8_developer ol8_developer_EPEL
# Upgrade all packages
RUN dnf upgrade -y
# Install the necessary development tools and packages
RUN dnf install -y \
gcc-toolset-10 glibc-headers kernel-headers \
make patch python2 \
python3.12
RUN alternatives --set python3 /usr/bin/python3.12
# Install Node.js 20 and yarn
RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -
RUN dnf install -y nodejs
RUN npm install -g yarn
COPY . ./
ARG PKG_FETCH_OPTION_n
RUN yarn install --ignore-engines
RUN source /opt/rh/gcc-toolset-10/enable && \
yarn start --node-range $PKG_FETCH_OPTION_n --output dist
FROM scratch
COPY --from=build /root/pkg-fetch/dist /