zenhack / simp_le

Simple Let's Encrypt client
GNU General Public License v3.0
224 stars 38 forks source link

Error building Dockerfile #152

Open esale opened 2 years ago

esale commented 2 years ago

Hi, I tried to build this image today, and I got an error:

    Python: 3.6.9
        platform: Linux-4.9.0-0.bpo.6-amd64-x86_64-with
        pip: 18.1
        setuptools: 59.6.0
        setuptools_rust: 1.1.2
        =============================DEBUG ASSISTANCE=============================

    error: can't find Rust compiler

    If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

    To update pip, run:

        pip install --upgrade pip

    and then retry package installation.

    If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.

    This package requires Rust >=1.41.0.

To solve it, I had to modify your Dockerfile:

    && cp /usr/share/zoneinfo/UTC /etc/localtime \
    && echo "UTC" > /etc/timezone \
    && pip3 install --upgrade pip \
    && pip3 install six \
    && pip3 install --no-cache-dir /simp_le/src \
    && rm -rf /simp_le/src \
    && apk del --purge .build-deps \
    && rm -fv /var/cache/apk/*

I just added the 2 lines after "echo"

I added a pull request.

zenhack commented 2 years ago

Hm, I get a different error when building:

Directory '/simp_le/src' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

...and your patch doesn't fix it.

I have never personally really maintained the docker images; historically @buchdag and others have kept them afloat. And looking at the Dockerfile I'm not sure how this is supposed to work: it tries to COPY . /simp_le/src, but it's in a subdirectory, so that wouldn't actually pull in anything useful...

It sounds like you got farther than I did, was there some additional step other than just "docker build docker/"? :sweat_smile: