Dockerfile building not working - error: can't find Rust compiler
I've just cloned the repository and executed "docker build -t test:latest ." from inside the folder, but the following error appears:
#7 134.3 =============================DEBUG ASSISTANCE=============================
#7 134.3 If you are seeing a compilation error please try the following steps to
#7 134.3 successfully install cryptography:
#7 134.3 1) Upgrade to the latest pip and try again. This will fix errors for most
#7 134.3 users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
#7 134.3 2) Read https://cryptography.io/en/latest/installation.html for specific
#7 134.3 instructions for your platform.
#7 134.3 3) Check our frequently asked questions for more information:
#7 134.3 https://cryptography.io/en/latest/faq.html
#7 134.3 4) Ensure you have a recent Rust toolchain installed:
#7 134.3 https://cryptography.io/en/latest/installation.html#rust
#7 134.3 5) If you are experiencing issues with Rust for *this release only* you may
#7 134.3 set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
#7 134.3 =============================DEBUG ASSISTANCE=============================
#7 134.3
#7 134.3 error: can't find Rust compiler
#7 134.3
#7 134.3 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.
#7 134.3
#7 134.3 To update pip, run:
#7 134.3
#7 134.3 pip install --upgrade pip
#7 134.3
#7 134.3 and then retry package installation.
#7 134.3
#7 134.3 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.
#7 134.3
#7 134.3 This package requires Rust >=1.41.0.
#7 134.3 ----------------------------------------
#7 134.3 ERROR: Failed building wheel for cryptography
#7 134.3 Failed to build cryptography
#7 134.3 ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
-----
executor failed running [/bin/sh -c echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && echo /etc/apk/respositories && apk update && apk upgrade && apk add --no-cache bash openssh-client wget supervisor curl libcurl libzip-dev bzip2-dev imap-dev openssl-dev git python3 python3-dev py3-pip augeas-dev libressl-dev ca-certificates dialog autoconf make gcc musl-dev linux-headers libmcrypt-dev libpng-dev icu-dev libpq libxslt-dev libffi-dev freetype-dev sqlite-dev libjpeg-turbo-dev postgresql-dev && docker-php-ext-configure gd --with-freetype --with-jpeg && docker-php-ext-install iconv pdo_mysql pdo_sqlite pgsql pdo_pgsql mysqli gd exif intl xsl json soap dom zip opcache && pecl install xdebug-2.9.2 && pecl install -o -f redis && echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini && docker-php-source delete && mkdir -p /etc/nginx && mkdir -p /var/www/app && mkdir -p /run/nginx && mkdir -p /var/log/supervisor && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php --quiet --install-dir=/usr/bin --filename=composer && rm composer-setup.php && pip3 install -U pip && pip3 install -U certbot && mkdir -p /etc/letsencrypt/webrootauth && apk del gcc musl-dev linux-headers libffi-dev augeas-dev python3-dev make autoconf]: exit code: 1
As long as the docker image is built I'm sure that there must be, somewhere, a correct Dockerfile which will compile at once. I want a correct Dockerfile because we want to change some things from the source image (change nginx user to www-data to make coherence in volumes permissions between containers and hosts).
Edited by Joel Pérez