feat: add mise base
This commit is contained in:
@@ -7,8 +7,10 @@ ENV PATH="/app/envs/mise/shims:/app/envs/mise/bin:$PATH"
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
|
||||
&& apk add --no-cache \
|
||||
tzdata git bash curl wget vim htop ca-certificates rsync \
|
||||
python3 \
|
||||
# Python build dependencies
|
||||
build-base libffi-dev openssl-dev bzip2-dev zlib-dev readline-dev sqlite-dev ncurses-dev xz-dev \
|
||||
&& ln -sf /usr/bin/python3 /usr/bin/python \
|
||||
&& cp /usr/share/zoneinfo/${TZ} /etc/localtime \
|
||||
&& echo "${TZ}" > /etc/timezone \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
@@ -16,10 +18,10 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/re
|
||||
# 安装 mise
|
||||
RUN curl https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh
|
||||
|
||||
# 使用 mise 安装最新版本的 Node.js 和 Python
|
||||
# 暂时安装到 /opt/mise-base,启动时会复制到 /app/envs/mise
|
||||
# 使用 mise 安装运行时
|
||||
ENV MISE_DATA_DIR=/opt/mise-base
|
||||
ENV MISE_CONFIG_DIR=/opt/mise-base
|
||||
ENV MISE_HTTP_TIMEOUT=300
|
||||
RUN (mise use -g node@latest python@latest || mise use -g node@latest python@latest || mise use -g node@latest python@latest) \
|
||||
ENV PYTHON_BUILD_MIRROR_URL=https://pyenv.pages.dev/api/mirror/binaries
|
||||
RUN (mise use -g node@22 python@3.12 || mise use -g node@22 python@3.12) \
|
||||
&& mise prune -- -f
|
||||
|
||||
Reference in New Issue
Block a user