Files

27 lines
671 B
Docker
Raw Permalink Normal View History

2024-05-19 22:38:21 +08:00
FROM ubuntu:22.04
LABEL maintainer="joestar817@foxmail.com"
# 安装依赖并设置时区
2024-05-19 22:38:21 +08:00
RUN apt update && apt install -y \
ipmitool \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/* \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo 'Asia/Shanghai' > /etc/timezone
2024-05-19 22:38:21 +08:00
# 复制应用文件
2024-05-19 22:38:21 +08:00
COPY . /dell-fans-controller-docker
WORKDIR /dell-fans-controller-docker
# 如果有requirements.txt则安装Python依赖
# COPY requirements.txt .
# RUN pip3 install --no-cache-dir -r requirements.txt
# 暴露可能需要的端口(虽然这个应用不需要)
# EXPOSE 80
2024-05-19 22:38:21 +08:00
# 设置启动命令
CMD ["python3", "start.py"]
2024-05-19 22:38:21 +08:00