mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 20:08:59 +02:00
Use NVM to install nodejs v8 and yarn
Prevents failure of the installation of jellyfin-web dependencies due to the NodeJS version in EPEL being too old. v8 might be a little conservative but is the earliest compatible version. Instead of using their repo to install Yarn, use the new nvm binary to install Yarn, thus forcing it to use the updated NodeJS version.
This commit is contained in:
parent
d8c3b26fa6
commit
f20555bf4a
2 changed files with 9 additions and 5 deletions
|
@ -13,17 +13,19 @@ RUN yum update -y \
|
||||||
&& yum install -y epel-release
|
&& yum install -y epel-release
|
||||||
|
|
||||||
# Install build dependencies
|
# Install build dependencies
|
||||||
RUN yum install -y @buildsys-build rpmdevtools yum-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel nodejs wget git
|
RUN yum install -y @buildsys-build rpmdevtools yum-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel wget git
|
||||||
|
|
||||||
|
# Install recent NodeJS and Yarn
|
||||||
|
RUN wget -O- https://raw.githubusercontent.com/creationix/nvm/v0.35.0/install.sh | /bin/bash \
|
||||||
|
&& source "$HOME/.nvm/nvm.sh" \
|
||||||
|
&& nvm install v8 \
|
||||||
|
&& npm install -g yarn
|
||||||
|
|
||||||
# Install DotNET SDK
|
# Install DotNET SDK
|
||||||
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm \
|
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm \
|
||||||
&& rpmdev-setuptree \
|
&& rpmdev-setuptree \
|
||||||
&& yum install -y dotnet-sdk-${SDK_VERSION}
|
&& yum install -y dotnet-sdk-${SDK_VERSION}
|
||||||
|
|
||||||
# Install yarn package manager
|
|
||||||
RUN wget -q -O /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
|
||||||
&& yum install -y yarn
|
|
||||||
|
|
||||||
# Create symlinks and directories
|
# Create symlinks and directories
|
||||||
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh \
|
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh \
|
||||||
&& mkdir -p ${SOURCE_DIR}/SPECS \
|
&& mkdir -p ${SOURCE_DIR}/SPECS \
|
||||||
|
|
|
@ -18,6 +18,8 @@ pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
checkout -b origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
|
source "$HOME/.nvm/nvm.sh"
|
||||||
|
nvm use v8
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
mv dist/* ${web_target}/
|
mv dist/* ${web_target}/
|
||||||
|
|
Loading…
Reference in a new issue