meian
This commit is contained in:
32
meian/Dockerfile
Normal file
32
meian/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
# 将官方 Python 运行时用作父镜像
|
||||
FROM python:3.10.13-slim-bullseye
|
||||
|
||||
# 工作目录设置
|
||||
RUN mkdir -p /app
|
||||
WORKDIR /app/meian
|
||||
|
||||
# 将文件复制到容器中
|
||||
COPY btop ./sources.list.bullseye ./requirements.txt ./*.py /app/meian/
|
||||
COPY ./data /app/meian/data
|
||||
COPY ./devices /app/meian/devices
|
||||
|
||||
RUN export TZ=Asia/Shanghai \
|
||||
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
|
||||
&& echo $TZ > /etc/timezone \
|
||||
&& export http_proxy=$proxy_url && export https_proxy=$proxy_url \
|
||||
&& mv sources.list.bullseye /etc/apt/sources.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y iputils-ping vim net-tools telnet sqlite3 curl \
|
||||
&& pip install --no-cache-dir -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com --timeout 1000 \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& unset http_proxy \
|
||||
&& unset https_proxy
|
||||
|
||||
RUN echo "alias ll='ls -alh --color'" >> /root/.bashrc
|
||||
RUN echo "alias ll='ls -alh --color'" >> /root/.profile
|
||||
|
||||
# 0: 本地环境,1:测试容器环境,2: 生产容器环境,3: 本地开发环境
|
||||
ENV ENV_TYPE=2
|
||||
|
||||
#CMD ["sleep", "3600"]
|
||||
CMD ["python", "app.py"]
|
||||
Reference in New Issue
Block a user