31 lines
926 B
Docker
31 lines
926 B
Docker
FROM ubuntu:latest
|
||
|
||
# 设置为阿里的镜像源
|
||
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
|
||
RUN sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
|
||
|
||
# 清除缓存 并 更新
|
||
RUN apt-get clean && apt-get update
|
||
|
||
# 安装 git 和一些基础工具
|
||
RUN apt-get install -y sshpass git git-lfs curl
|
||
|
||
# 安装nodejs 23版本
|
||
RUN curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
|
||
RUN bash nodesource_setup.sh
|
||
RUN apt-get install -y nodejs
|
||
|
||
# 设置npm镜像地址
|
||
RUN npm config set registry https://registry.npmmirror.com
|
||
# 删除 nodejs 安装脚本
|
||
RUN rm -rf /nodesource_setup.sh
|
||
|
||
# 配置git账户和邮箱
|
||
RUN git config --global user.name "bmy" && git config --global user.email "2271608011@qq.com"
|
||
# 取消git对ssl证书的验证,让 drone 可以顺利克隆代码
|
||
RUN git config --global http.sslVerify "false"
|
||
|
||
CMD ["/bin/bash"]
|
||
|
||
|