16 lines
444 B
Docker
16 lines
444 B
Docker
FROM --platform=linux/amd64 registry.access.redhat.com/ubi8/python-39
|
|
|
|
WORKDIR /app
|
|
|
|
# 复制依赖文件
|
|
COPY requirements.txt .
|
|
|
|
# 安装依赖和PyInstaller
|
|
RUN pip3 install --no-cache-dir -r requirements.txt || true && \
|
|
pip3 install --no-cache-dir pyinstaller
|
|
|
|
# 设置工作目录
|
|
WORKDIR /build
|
|
|
|
# 默认命令
|
|
CMD ["pyinstaller", "--onefile", "--noconfirm", "--add-data", "static:static", "flask_app.py", "-n", "flask_http_redhat"] |