-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
31 lines (23 loc) · 965 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.11-slim
LABEL maintainer="imaguowei@gmail.com"
LABEL name="maguowei/python"
LABEL version="0.2.0"
# RUN sed -i "s/deb.debian.org/mirrors.aliyun.com/g" /etc/apt/sources.list
# RUN sed -i "s/security.debian.org/mirrors.aliyun.com/g" /etc/apt/sources.list
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
locales \
&& rm -rf /var/lib/apt/lists/*
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && echo "zh_CN.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_CTYPE zh_CN.UTF-8
# ENV PIP_INDEX_URL https://mirrors.aliyun.com/pypi/simple/
# ENV PIPENV_PYPI_MIRROR https://mirrors.aliyun.com/pypi/simple/
ENV TZ=Asia/Shanghai
RUN echo $TZ > /etc/timezone && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
ENV POETRY_VIRTUALENVS_CREATE false
RUN pip install -U pip && pip install poetry
CMD ["python"]