FROM node:20.11.1-slim
RUN apt install apt-transport-https
COPY sources.list /etc/apt/ #debian | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
RUN apt-get update && apt-get install -y wget && \
wget -qO- https://get.pnpm.io/install.sh | ENV="/usr/.shrc" SHELL="$(which sh)" sh - && \
mv /root/.local/share/pnpm/pnpm /usr/local/bin && \
sed -i 's#/root/.local/share/pnpm#/usr/local/bin#g' /usr/.shrc && \
echo '#!/bin/bash\nsource /usr/.shrc\nexec "$@"' > /start.sh && \
chmod +x /start.sh
ENTRYPOINT ["/start.sh"]