更新 Dockerfile
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
mol
2024-02-24 14:46:20 +00:00
parent 38950abd7e
commit 23a7caf880

View File

@ -37,14 +37,30 @@ RUN echo "安装基础工具与配置文件" && \
# 安装 node 环境 # 安装 node 环境
echo "安装 node 环境" && \ echo "安装 node 环境" && \
apt-get install -y npm && \ # apt-get install -y npm && \
# 安装 brew 管理器
export HOMEBREW_INSTALL_FROM_API=1 && \
export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api" && \
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles" && \
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git" && \
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git" && \
git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install && \
/bin/bash brew-install/install.sh && \
rm -rf brew-install && \
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)" && \
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" && \
test -r ~/.bash_profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bash_profile && \
test -r ~/.profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.profile && \
test -r ~/.zprofile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.zprofile && \
brew update && \
# 安装 n node 管理器
brew install n && \
n 18.15.0 && \
# 安装 nrm # 安装 nrm
npm install -g nrm --registry=http://registry.npmmirror.com && \ npm install -g nrm --registry=http://registry.npmmirror.com && \
nrm use taobao && \ nrm use taobao && \
# 安装 n node 管理器 # npm install -g n && \
npm install -g n && \
# 安装最新版本 node # 安装最新版本 node
n 18.15.0 && \
# 安装 web 服务器 # 安装 web 服务器
# npm i -g live-server # npm i -g live-server