diff --git a/Dockerfile b/Dockerfile index ffc72ae..a073fff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,27 +42,15 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-s -w FROM debian:bookworm-slim ENV TZ=Asia/Shanghai -ENV CONDA_DIR=/opt/miniforge3 -ENV PATH=${CONDA_DIR}/bin:$PATH RUN sed -i 's@deb.debian.org@mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list.d/debian.sources \ && sed -i 's@security.debian.org@mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list.d/debian.sources \ && echo "${TZ}" > /etc/timezone \ && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ && apt update \ - && apt install -y tzdata git gcc curl wget vim ca-certificates procps htop e2fsprogs \ - && rm -rf /var/lib/apt/lists/* \ - && curl -sSL https://gh-proxy.com/https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh -o /tmp/miniforge.sh \ - && bash /tmp/miniforge.sh -b -p ${CONDA_DIR} \ - && rm -f /tmp/miniforge.sh \ - && "${CONDA_DIR}"/bin/conda config --set show_channel_urls yes \ - && "${CONDA_DIR}"/bin/conda config --set channel_priority strict \ - && "${CONDA_DIR}"/bin/conda init \ - && "${CONDA_DIR}"/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main \ - && "${CONDA_DIR}"/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free \ - && "${CONDA_DIR}"/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge \ - && "${CONDA_DIR}"/bin/python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \ - && "${CONDA_DIR}"/bin/conda clean -afy + && apt install -y tzdata git gcc curl wget vim nodejs npm python3 python3-pip \ + && rm -rf /var/lib/apt/lists/* \ + && python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple WORKDIR /app diff --git a/Dockerfile.both b/Dockerfile.both new file mode 100644 index 0000000..30935ae --- /dev/null +++ b/Dockerfile.both @@ -0,0 +1,12 @@ +FROM debian:bookworm-slim + +ENV TZ=Asia/Shanghai + +RUN sed -i 's@deb.debian.org@mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list.d/debian.sources \ + && sed -i 's@security.debian.org@mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list.d/debian.sources \ + && echo "${TZ}" > /etc/timezone \ + && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ + && apt update \ + && apt install -y tzdata git gcc curl wget vim nodejs npm python3 python3-pip \ + && rm -rf /var/lib/apt/lists/* +