mirror of
https://github.com/lkddi/dell-fans-controller-docker.git
synced 2026-04-03 09:55:11 +08:00
添加GitHub Actions自动构建Docker镜像工作流
- 创建了自动构建和推送Docker镜像的GitHub Actions工作流 - 支持多架构构建 (linux/amd64, linux/arm64) - 自动推送到Docker Hub和阿里云容器镜像服务 - 更新Dockerfile以优化构建过程 - 更新README.md包含Docker镜像信息
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -1,19 +1,26 @@
|
||||
FROM ubuntu:22.04
|
||||
LABEL maintainer="joestar817@foxmail.com"
|
||||
|
||||
|
||||
# 安装依赖并设置时区
|
||||
RUN apt update && apt install -y \
|
||||
ipmitool \
|
||||
python3 \
|
||||
python3-pip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
python3-pip \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo 'Asia/Shanghai' > /etc/timezone
|
||||
|
||||
# 复制应用文件
|
||||
COPY . /dell-fans-controller-docker
|
||||
WORKDIR /dell-fans-controller-docker
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
RUN echo 'Asia/Shanghai' >/etc/timezone
|
||||
# 如果有requirements.txt则安装Python依赖
|
||||
# COPY requirements.txt .
|
||||
# RUN pip3 install --no-cache-dir -r requirements.txt
|
||||
|
||||
CMD ["python3","start.py"]
|
||||
# 暴露可能需要的端口(虽然这个应用不需要)
|
||||
# EXPOSE 80
|
||||
|
||||
# 设置启动命令
|
||||
CMD ["python3", "start.py"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user