代码拉取完成,页面将自动刷新
# Setup an Alpine test environment with Python, PyInstaller and its test dependencies.
#
# To build, boot into and invoke pytest inside this image run:
#
# docker build -f alpine.dockerfile -t some-arbitrary-name .
# docker run -it some-arbitrary-name
# pytest
#
# Or if you prefer a one-liner:
#
# docker run -it $(docker build -q -f alpine.dockerfile .) pytest
#
# This docker file should be used for testing only. The bootloaders it compiles internally are not suitable for PyPI.
#
# ---
# This dockerfile is 2-part. The first half builds and the second tests. The test half should only contain PyInstaller's
# runtime and test dependencies - no C compiler or dev packages. Once other packages start shipping musl compatible
# wheels, most or possibly all of the build half will be safely removable.
FROM python:alpine AS wheel-factory
# Install a C compiler.
RUN apk add musl-dev gcc
# With zlib headers to compiler the bootloader,
RUN apk add zlib-dev
# Linux headers to build psutil from source.
RUN apk add linux-headers
# Build/download wheels for all test requirements.
RUN mkdir -p /io/tests
WORKDIR /io
COPY tests/requirements-base.txt tests/
COPY tests/requirements-tools.txt tests/
RUN pip wheel -r tests/requirements-tools.txt -w wheels
# Build a wheel for PyInstaller. Do this last and use as few files as possible to maximize cache-ability.
COPY COPYING.txt .
COPY setup.* ./
COPY bootloader bootloader
COPY PyInstaller PyInstaller
RUN python setup.py -qqq bdist_wheel -d wheels
FROM python:alpine
CMD ash
WORKDIR /io
# Runtime libraries required by lxml.
RUN apk add libxml2 libxslt
# Required by tkinter.
RUN apk add tk
# Used as a test library for some ctypes finding tests.
RUN apk add libpng
# And by PyInstaller itself.
RUN apk add binutils
COPY setup.cfg .
# Import and the precompiled wheels from the `build` image.
COPY --from=wheel-factory /io/wheels /wheels
RUN pip install /wheels/*.whl
COPY tests /io/tests
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。