tarampampam / laravel-roadrunner-in-docker

:rocket: An example of Laravel app that runs in a docker container with RoadRunner
MIT License
178 stars 35 forks source link

make install does not work #58

Closed YaroslavBemov closed 3 years ago

YaroslavBemov commented 3 years ago

~/projects/experiments/laravel-roadrunner-in-docker   master  make install

Building app
Step 1/12 : FROM --platform=linux/amd64 php:8.0.9-alpine as runtime
 ---> d75050b53d70
Step 2/12 : COPY --from=composer:2.1.5 /usr/bin/composer /usr/bin/composer
 ---> Using cache
 ---> 3448bdd0f8c1
Step 3/12 : COPY --from=spiralscout/roadrunner:2.3.3 /usr/bin/rr /usr/bin/rr
 ---> Using cache
 ---> 3b4dc4e4a3a1
Step 4/12 : ENV COMPOSER_HOME="/tmp/composer"
 ---> Using cache
 ---> 987a6c6a96e5
Step 5/12 : RUN set -x     && apk add --no-cache         postgresql-libs         icu-libs     && apk add --no-cache --virtual .build-deps         postgresql-dev         autoconf         openssl         make         g++     && docker-php-ext-install -j$(nproc)         pdo_pgsql         sockets         opcache         pcntl         intl         1>/dev/null     && pecl install -o redis 1>/dev/null     && echo 'extension=redis.so' > ${PHP_INI_DIR}/conf.d/redis.ini     && wget -q "https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-amd64"          -O /usr/bin/supercronic     && chmod +x /usr/bin/supercronic     && mkdir /etc/supercronic     && echo '*/1 * * * * php /app/artisan schedule:run' > /etc/supercronic/laravel     && openssl req -x509 -nodes -days 1095 -newkey rsa:2048         -subj "/C=CA/ST=QC/O=Company, Inc./CN=mydomain.com"         -addext "subjectAltName=DNS:mydomain.com"         -keyout /etc/ssl/private/selfsigned.key         -out /etc/ssl/certs/selfsigned.crt     && chmod 644 /etc/ssl/private/selfsigned.key     && docker-php-source delete     && apk del .build-deps     && rm -R /tmp/pear     && echo -e "\nopcache.enable=1\nopcache.enable_cli=1\nopcache.jit_buffer_size=32M\nopcache.jit=1235\n" >>         ${PHP_INI_DIR}/conf.d/docker-php-ext-opcache.ini     && php -m     && adduser         --disabled-password         --shell "/sbin/nologin"         --home "/nonexistent"         --no-create-home         --uid "10001"         --gecos ""         "appuser"     && mkdir /app /var/run/rr     && chown -R appuser:appuser /app /var/run/rr     && chmod -R 777 /var/run/rr
 ---> Running in 4350d3a9b350
+ apk add --no-cache postgresql-libs icu-libs
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/8) Installing libgcc (10.3.1_git20210424-r2)
(2/8) Installing libstdc++ (10.3.1_git20210424-r2)
(3/8) Installing icu-libs (67.1-r2)
(4/8) Installing gdbm (1.19-r0)
(5/8) Installing libsasl (2.1.27-r12)
(6/8) Installing libldap (2.4.58-r0)
(7/8) Installing libpq (13.3-r0)
(8/8) Installing postgresql-libs (13.3-r0)
Executing busybox-1.33.1-r3.trigger
OK: 48 MiB in 40 packages
+ apk add --no-cache --virtual .build-deps postgresql-dev autoconf openssl make g++
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/28) Installing libffi (3.3-r2)

...

build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
mkdir: can't create directory 'collator/.libs': File exists
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/main: No such file or directory
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/community: No such file or directory
+ pecl install -o redis
ERROR: Service 'app' failed to build : The command '/bin/sh -c set -x     && apk add --no-cache         postgresql-libs         icu-libs     && apk add --no-cache --virtual .build-deps         postgresql-dev         autoconf         openssl         make         g++     && docker-php-ext-install -j$(nproc)         pdo_pgsql         sockets         opcache         pcntl         intl         1>/dev/null     && pecl install -o redis 1>/dev/null     && echo 'extension=redis.so' > ${PHP_INI_DIR}/conf.d/redis.ini     && wget -q "https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-amd64"          -O /usr/bin/supercronic     && chmod +x /usr/bin/supercronic     && mkdir /etc/supercronic     && echo '*/1 * * * * php /app/artisan schedule:run' > /etc/supercronic/laravel     && openssl req -x509 -nodes -days 1095 -newkey rsa:2048         -subj "/C=CA/ST=QC/O=Company, Inc./CN=mydomain.com"         -addext "subjectAltName=DNS:mydomain.com"         -keyout /etc/ssl/private/selfsigned.key         -out /etc/ssl/certs/selfsigned.crt     && chmod 644 /etc/ssl/private/selfsigned.key     && docker-php-source delete     && apk del .build-deps     && rm -R /tmp/pear     && echo -e "\nopcache.enable=1\nopcache.enable_cli=1\nopcache.jit_buffer_size=32M\nopcache.jit=1235\n" >>         ${PHP_INI_DIR}/conf.d/docker-php-ext-opcache.ini     && php -m     && adduser         --disabled-password         --shell "/sbin/nologin"         --home "/nonexistent"         --no-create-home         --uid "10001"         --gecos ""         "appuser"     && mkdir /app /var/run/rr     && chown -R appuser:appuser /app /var/run/rr     && chmod -R 777 /var/run/rr' returned a non-zero code: 1
make: *** [Makefile:17: install] Ошибка 1

Docker version 20.10.8, build 3967b7d docker-compose version 1.29.2, build 5becea4c Ubuntu 20.04.2 LTS

tarampampam commented 3 years ago

It seems like a network error. Could you please try to check your connection?

YaroslavBemov commented 3 years ago

ping dl-cdn.alpinelinux.org

PING dualstack.d.sni.global.fastly.net (151.101.14.133) 56(84) bytes of data.
64 bytes from 151.101.14.133 (151.101.14.133): icmp_seq=1 ttl=56 time=37.9 ms
64 bytes from 151.101.14.133 (151.101.14.133): icmp_seq=2 ttl=56 time=37.8 ms
64 bytes from 151.101.14.133 (151.101.14.133): icmp_seq=3 ttl=56 time=37.7 ms
64 bytes from 151.101.14.133 (151.101.14.133): icmp_seq=4 ttl=56 time=37.9 ms
64 bytes from 151.101.14.133 (151.101.14.133): icmp_seq=5 ttl=56 time=37.8 ms
64 bytes from 151.101.14.133 (151.101.14.133): icmp_seq=6 ttl=56 time=37.6 ms
^C
--- dualstack.d.sni.global.fastly.net ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 37.570/37.769/37.896/0.106 ms
tarampampam commented 3 years ago

Was tested by me right now:

$ docker build --rm .

Sending build context to Docker daemon  592.9kB
Step 1/12 : FROM --platform=linux/amd64 php:8.0.9-alpine as runtime
 ---> d75050b53d70
Step 2/12 : COPY --from=composer:2.1.5 /usr/bin/composer /usr/bin/composer
 ---> Using cache
 ---> 30677683883a
Step 3/12 : COPY --from=spiralscout/roadrunner:2.3.3 /usr/bin/rr /usr/bin/rr
 ---> Using cache
 ---> 3ff453727442
Step 4/12 : ENV COMPOSER_HOME="/tmp/composer"
 ---> Using cache
 ---> 6b8342727b05
...
configure.ac:161: the top level
mkdir: can't create directory 'collator/.libs': File exists
mkdir: can't create directory '.libs': File exists
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/main: No such file or directory
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/community: No such file or directory
+ pecl install -o redis
+ echo 'extension=redis.so'
+ wget -q https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-amd64 -O /usr/bin/supercronic
+ chmod +x /usr/bin/supercronic
+ mkdir /etc/supercronic
+ echo '*/1 * * * * php /app/artisan schedule:run'
+ openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -subj '/C=CA/ST=QC/O=Company, Inc./CN=mydomain.com' -addext 'subjectAltName=DNS:mydomain.com' -keyout /etc/ssl/private/selfsigned.key -out /etc/ssl/certs/selfsigned.crt
Generating a RSA private key
...
Step 12/12 : ENTRYPOINT []
 ---> Running in b3fa8a47aa6d
Removing intermediate container b3fa8a47aa6d
 ---> f0c86cf98997
Successfully built f0c86cf98997

Maybe network problems on the pecl repositories side?

YaroslavBemov commented 3 years ago

I tried yesterday and today. I'll try again tomorrow.

tarampampam commented 3 years ago

The latest GitHub actions build was successful too: https://github.com/tarampampam/laravel-roadrunner-in-docker/runs/3308856714?check_suite_focus=true#step:3:810

YaroslavBemov commented 3 years ago

Everything is the same today.

tarampampam commented 3 years ago

Cannot be reproduced :( https://github.com/tarampampam/laravel-roadrunner-in-docker/pull/59/checks?check_run_id=3319797775

YaroslavBemov commented 3 years ago

Everything worked on windows. The problem is in my Ubuntu, but I don't know where exactly.