[Python] creating docket image for Builozer on WSL (Ubuntu 22.04) fail

Discussão em 'Python' iniciado por Stack, Maio 11, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to build docker image for Buildozer as explained here: https://github.com/kivy/buildozer/tree/master?tab=readme-ov-file

    but I am getting this error:

    sudo docker build --tag=kivy/buildozer .
    [+] Building 123.1s (13/13) FINISHED docker:default
    => [internal] load build definition from Dockerfile 0.0s
    => => transferring dockerfile: 2.34kB 0.0s
    => [internal] load metadata for docker.io/library/ubuntu:22.04 1.7s
    => [internal] load .dockerignore 0.1s
    => => transferring context: 2B 0.0s
    => [internal] load build context 0.3s
    => => transferring context: 16.17MB 0.3s
    => [1/9] FROM docker.io/library/ubuntu:22.04@sha256:67cadaff1dca187079fce41360d5a7eb6f7dcd3745e53c79ad5efd8563118240 4.9s
    => => resolve docker.io/library/ubuntu:22.04@sha256:67cadaff1dca187079fce41360d5a7eb6f7dcd3745e53c79ad5efd8563118240 0.0s
    => => sha256:67cadaff1dca187079fce41360d5a7eb6f7dcd3745e53c79ad5efd8563118240 6.69kB / 6.69kB 0.0s
    => => sha256:899ec23064539c814a4dbbf98d4baf0e384e4394ebc8638bea7bbe4cb8ef4e12 424B / 424B 0.0s
    => => sha256:c42dedf797ba5e7e37e744cdd998e1db046375c702d6dc8a822b422189b019bb 2.30kB / 2.30kB 0.0s
    => => sha256:215ed5a638430309375291c48a01872859a8dbf1331e54ba0af221918eb8ce2e 29.53MB / 29.53MB 3.2s
    => => extracting sha256:215ed5a638430309375291c48a01872859a8dbf1331e54ba0af221918eb8ce2e 1.3s
    => [2/9] RUN apt update -qq > /dev/null && DEBIAN_FRONTEND=noninteractive apt install -qq --yes --no-install-recommends locales 12.5s
    => [3/9] RUN apt update -qq > /dev/null && DEBIAN_FRONTEND=noninteractive apt install -qq --yes --no-install-recommends autoco 100.9s
    => [4/9] RUN useradd --create-home --shell /bin/bash user 0.5s
    => [5/9] RUN usermod -append --groups sudo user 0.6s
    => [6/9] RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers 0.7s
    => [7/9] WORKDIR /home/user/hostcwd 0.1s
    => [8/9] COPY --chown=user:user . /home/user/src 0.3s
    => ERROR [9/9] RUN pip3 install --user --upgrade "Cython<3.0" wheel pip /home/user/src 0.8s
    ------
    > [9/9] RUN pip3 install --user --upgrade "Cython<3.0" wheel pip /home/user/src:
    0.718 ERROR: Directory '/home/user/src' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
    ------
    Dockerfile:83
    --------------------
    81 |
    82 | # installs buildozer and dependencies
    83 | >>> RUN pip3 install --user --upgrade "Cython<3.0" wheel pip ${SRC_DIR}
    84 |
    85 | ENTRYPOINT ["buildozer"]
    --------------------
    ERROR: failed to solve: process "/bin/sh -c pip3 install --user --upgrade \"Cython<3.0\" wheel pip ${SRC_DIR}" did not complete successfully: exit code: 1


    The build environment is: WSl with Ubuntu 22.04 Python 3.10.12 Docker version 28.1.1, build 4eba377

    To build Docker, I downloaded the Dockerfile from the repository and put it into the current directory. Then, I used the above command to build it.

    Any idea why this is not working properly?

    How can I install Buildozer in WSL (Ubuntu 22.04) to build and run a Python test application on an Android phone?

    Continue reading...

Compartilhe esta Página