orbitmediastudios / orbit-docker-image-file

OrbitMedia Dockerfiles
The Unlicense
1 stars 1 forks source link

Time out error when trying to add extentions to the image #12

Open neumartin opened 1 year ago

neumartin commented 1 year ago

Hi!

I'm trying to add the PostgreSQL extension and others to php:5.4-apache image, but when I did the apt-get install I got a timeout (freeze, never ending).

I have this Dockerfile:

FROM php:5.4-apache

RUN apt-get update

# Install Postgre PDO
RUN apt-get install -y libpq-dev \
    && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
    && docker-php-ext-install pdo pdo_pgsql pgsql

This is my console response when I do a docker build -t php5-custom .

 => [internal] load build definition from Dockerfile                                                                                     0.0s
[+] Building 376.4s (4/17)                                                                                                     docker:default
 => [internal] load .dockerignore                                                                                                        0.0s
 => => transferring context: 2B                                                                                                          0.0s
 => [internal] load build definition from Dockerfile                                                                                     0.0s
 => => transferring dockerfile: 865B                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/php:5.4-apache                                                                        0.0s
 => CACHED [ 1/14] FROM docker.io/library/php:5.4-apache                                                                                 0.0s
 => [ 2/14] RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libmcrypt-dev libxml2-dev libxslt1-dev git && rm -rf /var  376.3s
neumartin commented 1 year ago

I tried also with PHP 5.6, but I get different error:

Dockerfile:

FROM php:5.6-apache

# Install Postgre PDO
RUN apt-get update && apt-get install -y libpq-dev \
    && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
    && docker-php-ext-install pdo pdo_pgsql pgsql

Error:

[+] Building 9.9s (5/5) FINISHED                                                                                               docker:default
 => [internal] load build definition from Dockerfile                                                                                     0.0s
 => => transferring dockerfile: 262B                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                        0.0s
 => => transferring context: 2B                                                                                                          0.0s
 => [internal] load metadata for docker.io/library/php:5.6-apache                                                                        0.6s
 => CACHED [1/2] FROM docker.io/library/php:5.6-apache@sha256:0a40fd273961b99d8afe69a61a68c73c04bc0caa9de384d3b2dd9e7986eec86d           0.0s
 => ERROR [2/2] RUN apt-get update && apt-get install -y libpq-dev     && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql    9.2s
------
 > [2/2] RUN apt-get update && apt-get install -y libpq-dev     && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql     && docker-php-ext-install pdo pdo_pgsql pgsql:
0.261 Ign:1 http://deb.debian.org/debian stretch InRelease
0.268 Ign:2 http://deb.debian.org/debian stretch-updates InRelease
0.275 Ign:3 http://deb.debian.org/debian stretch Release
0.280 Ign:4 http://deb.debian.org/debian stretch-updates Release
0.502 Ign:5 http://deb.debian.org/debian stretch/main all Packages
0.724 Ign:6 http://deb.debian.org/debian stretch/main amd64 Packages
0.948 Ign:7 http://deb.debian.org/debian stretch-updates/main all Packages
1.167 Ign:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages
1.271 Ign:9 http://security.debian.org/debian-security stretch/updates InRelease
1.276 Ign:10 http://security.debian.org/debian-security stretch/updates Release
1.391 Ign:5 http://deb.debian.org/debian stretch/main all Packages
1.498 Ign:11 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
1.504 Ign:12 http://security.debian.org/debian-security stretch/updates/main all Packages
1.611 Ign:6 http://deb.debian.org/debian stretch/main amd64 Packages
1.734 Ign:11 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
1.739 Ign:12 http://security.debian.org/debian-security stretch/updates/main all Packages
1.750 Ign:11 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
1.755 Ign:12 http://security.debian.org/debian-security stretch/updates/main all Packages
1.864 Ign:7 http://deb.debian.org/debian stretch-updates/main all Packages
1.978 Ign:11 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
1.983 Ign:12 http://security.debian.org/debian-security stretch/updates/main all Packages
1.987 Ign:11 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
1.992 Ign:12 http://security.debian.org/debian-security stretch/updates/main all Packages
1.997 Err:11 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
1.997   404  Not Found [IP: 151.101.2.132 80]
2.003 Ign:12 http://security.debian.org/debian-security stretch/updates/main all Packages
2.082 Ign:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages
2.303 Ign:5 http://deb.debian.org/debian stretch/main all Packages
2.521 Ign:6 http://deb.debian.org/debian stretch/main amd64 Packages
2.786 Ign:7 http://deb.debian.org/debian stretch-updates/main all Packages
3.038 Ign:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages
3.286 Ign:5 http://deb.debian.org/debian stretch/main all Packages
3.573 Ign:6 http://deb.debian.org/debian stretch/main amd64 Packages
3.788 Ign:7 http://deb.debian.org/debian stretch-updates/main all Packages
4.022 Ign:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages
4.258 Ign:5 http://deb.debian.org/debian stretch/main all Packages
4.476 Ign:6 http://deb.debian.org/debian stretch/main amd64 Packages
4.711 Ign:7 http://deb.debian.org/debian stretch-updates/main all Packages
4.972 Ign:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages
5.212 Ign:5 http://deb.debian.org/debian stretch/main all Packages
5.447 Err:6 http://deb.debian.org/debian stretch/main amd64 Packages
5.447   404  Not Found
5.670 Ign:7 http://deb.debian.org/debian stretch-updates/main all Packages
9.199 Err:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages
9.199   404  Not Found
9.204 Reading package lists...
9.217 W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
9.217 W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
9.217 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
9.217 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
9.217 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
9.217 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.2.132 80]
9.217 E: Some index files failed to download. They have been ignored, or old ones used instead.
------
Dockerfile:4
--------------------
   3 |     # Install Postgre PDO
   4 | >>> RUN apt-get update && apt-get install -y libpq-dev \
   5 | >>>     && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
   6 | >>>     && docker-php-ext-install pdo pdo_pgsql pgsql
   7 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y libpq-dev     && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql     && docker-php-ext-install pdo pdo_pgsql pgsql" did not complete successfully: exit code: 100