首页 > 解决方案 > Dockerfiles 构建性能问题

问题描述

以下 Dockerfile 需要 30 多分钟才能构建。

FROM python:3.7-alpine
COPY . /app
WORKDIR /app
RUN apk add --no-cache python3-dev libstdc++ && \
    apk add --no-cache g++ && \
    ln -s /usr/include/locale.h /usr/include/xlocale.h && \
    pip install --upgrade pip && \
    pip3 install --upgrade pip && \
    pip3 install allure-behave && \
    pip3 install -r requirements.txt
entrypoint ["sh", "testsuite.sh"]

需求文件:

behave==1.2.6
boto3==1.8.2
botocore==1.11.9
pandas==0.25.0

这正常吗?

标签: python-3.xdockerfile

解决方案


推荐阅读