FROM python:3.6.8-slim-stretch
COPY ./pip.conf /root/.pip/
RUN cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& sed -i 's#http://deb.debian.org#http://mirrors.aliyun.com#g' /etc/apt/sources.list \
&& sed -i 's#http://security.debian.org#http://mirrors.aliyun.com#g' /etc/apt/sources.list \
&& echo "alias ll='ls -alF'" >> ~/.bashrc \
&& /bin/bash -c "source ~/.bashrc" \
&& apt-get update \
&& apt-get install -y --no-install-recommends locales locales-all vim procps curl telnet net-tools iputils-ping cron \
&& locale-gen zh_CN.UTF-8 zh_cn && dpkg-reconfigure locales && dpkg-reconfigure locales && locale-gen zh_CN.UTF-8 && /usr/sbin/update-locale LANG=zh_CN.UTF-8 \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
&& python3 -m pip install --upgrade pip \
&& rm -rf /var/cache/* \
&& rm -rf /tmp/*
ENV LANG C.UTF-8
ENV LANG zh_CN.UTF-8
ENV LANGUAGE zh_CN:zh
ENV LC_ALL zh_CN.UTF-8python3.6.8 基础镜像
最新推荐文章于 2025-10-18 11:21:20 发布
该Dockerfile用于创建一个基于Python3.6.8的精简镜像,设置了时区为亚洲/上海,并更改了Debian源为阿里云镜像源。同时,安装了locales、vim、procps、curl、telnet等工具,以及配置了locale为zh_CN.UTF-8,并更新了pip到最新版本。
3883

被折叠的 条评论
为什么被折叠?



