forked from vercel/pkg-fetch
-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDockerfile.linux
38 lines (26 loc) · 991 Bytes
/
Dockerfile.linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 /