linux: - Move ARGs right before where they are used - Move "COPY . ./" right before the "yarn" steps So there is no unnecessary reruns of steps linuxcross: - Move ARGs right before where they are used - Move "COPY . ./" right before the "yarn" steps - Don't attempt to install the cross toolchain if compiling natively - Add RANLIB override - Simplify ENVs
22 lines
771 B
Docker
22 lines
771 B
Docker
FROM registry.redhat.io/rhscl/devtoolset-10-toolchain-rhel7
|
|
|
|
USER root:root
|
|
WORKDIR /root/pkg-fetch/
|
|
|
|
RUN yum install -y glibc-headers kernel-headers git make patch python2 rh-nodejs14-npm rh-python38-python && scl enable rh-nodejs14 bash && scl enable rh-python38 bash
|
|
|
|
ENV LD_LIBRARY_PATH /opt/rh/rh-python38/root/usr/lib64:/opt/rh/rh-nodejs14/root/usr/lib64:$LD_LIBRARY_PATH
|
|
ENV MANPATH /opt/rh/rh-python38/root/usr/share/man:/opt/rh/rh-nodejs14/root/usr/share/man:$MANPATH
|
|
ENV PATH /opt/rh/rh-python38/root/usr/bin:/opt/rh/rh-nodejs14/root/usr/bin:$PATH
|
|
ENV PYTHONPATH /opt/rh/rh-nodejs14/root/usr/lib/python2.7/site-packages
|
|
|
|
RUN npm install -g yarn
|
|
|
|
COPY . ./
|
|
|
|
RUN yarn install
|
|
|
|
ARG PKG_FETCH_OPTION_n
|
|
|
|
RUN yarn start --node-range $PKG_FETCH_OPTION_n --output dist
|