46 lines
2.4 KiB
Plaintext
46 lines
2.4 KiB
Plaintext
#使用 node:bullseye-slim 做基础镜像减少大小。
|
|
|
|
# FROM docker.m.daocloud.io/library/node:bullseye-slim
|
|
# fixbug 最新node 版本编译不过去,
|
|
# ERROR Error: Cannot find module './passes/web-incoming'
|
|
|
|
FROM docker.m.daocloud.io/library/node:23.5.0-bullseye-slim
|
|
|
|
# https://opsx.alibaba.com/mirror
|
|
# 使用阿里云镜像地址。修改debian apt 更新地址,pip 地址,设置时区。
|
|
# 设置debian的镜像源
|
|
RUN echo "deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib" > /etc/apt/sources.list && \
|
|
echo "deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib" >> /etc/apt/sources.list && \
|
|
echo "deb http://mirrors.aliyun.com/debian-security/ bullseye-security main" >> /etc/apt/sources.list && \
|
|
echo "deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main" >> /etc/apt/sources.list && \
|
|
echo "deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib" >> /etc/apt/sources.list && \
|
|
echo "deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib" >> /etc/apt/sources.list && \
|
|
echo "deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib" >> /etc/apt/sources.list && \
|
|
echo "deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib" >> /etc/apt/sources.list && \
|
|
echo "[global]\n\
|
|
trusted-host=mirrors.aliyun.com\n\
|
|
index-url=http://mirrors.aliyun.com/pypi/simple" > /etc/pip.conf && \
|
|
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
|
echo "Asia/Shanghai" > /etc/timezone
|
|
|
|
#增加语言utf-8
|
|
ENV LANG=zh_CN.UTF-8
|
|
ENV LC_CTYPE=zh_CN.UTF-8
|
|
ENV LC_ALL=C
|
|
|
|
# 增加 TensorFlow 的支持,使用最新的2.0 编写代码。目前还是使用 1.x 吧,还没有学明白。
|
|
# RUN pip3 install tensorflow==2.0.0-rc1 keras
|
|
# RUN pip3 install tensorflow keras sklearn
|
|
|
|
# 设置 vim 的语言配置
|
|
RUN mkdir -p /etc/vim/ && \
|
|
echo "set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936" >> /etc/vim/vimrc && \
|
|
echo "set termencoding=utf-8" >> /etc/vim/vimrc && \
|
|
echo "set encoding=utf-8" >> /etc/vim/vimrc
|
|
|
|
# 安装 mysqlclient akshare (pandas ,numpy) tornado bokeh
|
|
# 安装 nodejs 库
|
|
# apt-get autoremove -y 删除没有用的依赖lib。减少镜像大小。1MB 也要节省。
|
|
# apt-get --purge remove 软件包名称 , 删除已安装包(不保留配置文件)。
|
|
RUN apt-get update && apt-get install -y python3 make g++ && apt-get clean
|