FROM alpine:3.19 ENV TZ=Asia/Shanghai 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 \ && BUILD_DEPS="build-base libffi-dev openssl-dev bzip2-dev zlib-dev readline-dev sqlite-dev ncurses-dev xz-dev" \ && apk add --no-cache $BUILD_DEPS \ && curl https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh \ && MISE_DATA_DIR=/opt/mise-base MISE_CONFIG_DIR=/opt/mise-base MISE_HTTP_TIMEOUT=300 \ PYTHON_BUILD_MIRROR_URL=https://pyenv.pages.dev/api/mirror/binaries \ (mise use -g node@22 python@3.12 || mise use -g node@22 python@3.12) \ && mise prune -- -f \ && apk del $BUILD_DEPS \ && ln -sf /usr/bin/python3 /usr/bin/python \ && cp /usr/share/zoneinfo/${TZ} /etc/localtime \ && echo "${TZ}" > /etc/timezone \ && rm -rf /var/cache/apk/* \ && rm -rf /root/.cache/mise /root/.cache/pip /opt/mise-base/cache/*