Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker fails with ldap dependencies #2703

Closed
nugatritter opened this issue Nov 1, 2023 · 4 comments
Closed

Docker fails with ldap dependencies #2703

nugatritter opened this issue Nov 1, 2023 · 4 comments
Assignees
Milestone

Comments

@nugatritter
Copy link

I cannot "compose" the Docker image. I always get an error on
RUN set -x && buildDeps="libldap2-dev" && apt-get update && apt-get install -y ${buildDeps} --no-install-recommends && docker-php-ext-configure ldap --with-libdir=lib
Are there any solutions?

docker compose up     
[+] Running 97/37
 ✔ composer 13 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                         391.4s 
 ✔ sqlserver 3 layers [⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                   356.0s 
 ✔ pnpm 8 layers [⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                   668.3s 
 ✔ postgres 13 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                         427.0s 
 ✔ elasticsearch 10 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                       659.6s 
 ✔ mariadb 8 layers [⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                243.9s 
 ✔ pgadmin 16 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                       284.9s 
 ✔ phpmyadmin 18 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                  189.8s 
[+] Building 60.4s (8/17)                                                                                                                                                              docker:desktop-linux
 => [phpmyfaq internal] load .dockerignore                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                        0.0s
 => [phpmyfaq internal] load build definition from Dockerfile                                                                                                                                          0.0s
 => => transferring dockerfile: 2.73kB                                                                                                                                                                 0.0s
 => [phpmyfaq internal] load metadata for docker.io/library/php:8.3.0RC4-apache                                                                                                                        2.4s
 => [phpmyfaq auth] library/php:pull token for registry-1.docker.io                                                                                                                                    0.0s
 => [phpmyfaq  1/12] FROM docker.io/library/php:8.3.0RC4-apache@sha256:c0bd01f67948da31fb5dda927fc873035f95b73bf1b3df47419220f8c0b4d5dc                                                               35.5s
 => => resolve docker.io/library/php:8.3.0RC4-apache@sha256:c0bd01f67948da31fb5dda927fc873035f95b73bf1b3df47419220f8c0b4d5dc                                                                           0.0s
 => => sha256:1b6db690faaae693fface34a50bfe91ec722f16596447dee7df8fb412cac50de 228B / 228B                                                                                                             0.5s
 => => sha256:a52439f351543dbca787c3477a8a818967bcedc1c39976df5f1abf6ccf6b1270 98.14MB / 98.14MB                                                                                                      32.8s
 => => sha256:a907a34bc172a1e33981632724b17a8d8495aff3eaffc563ca7605137f9e3332 12.74kB / 12.74kB                                                                                                       0.0s
 => => sha256:7b2675dd3270d646cc9609f7620fb3ee1b137cf246173d31b605f21c9162fb00 270B / 270B                                                                                                             0.5s
 => => sha256:c0bd01f67948da31fb5dda927fc873035f95b73bf1b3df47419220f8c0b4d5dc 1.86kB / 1.86kB                                                                                                         0.0s
 => => sha256:df9d8ecb94d83d4d63bfa0f3b47c16584b969df24dda3afd69401eaf152af7bd 3.04kB / 3.04kB                                                                                                         0.0s
 => => extracting sha256:1b6db690faaae693fface34a50bfe91ec722f16596447dee7df8fb412cac50de                                                                                                              0.0s
 => => sha256:37ad28fcd1b0bc7e479077bf6e839e44869e60ebea916fabfd682f1274093421 20.31MB / 20.31MB                                                                                                      22.1s
 => => sha256:0d265bb4013040b30cb0e5e0389c7d9125c6028ac19035bd68d2175bcedc11bf 472B / 472B                                                                                                             0.7s
 => => sha256:34c24de3ade9ec7b21b5c01ed31a77c990a79bd3dcf467a278892fe158aec1e3 512B / 512B                                                                                                             1.3s
 => => sha256:2f45d7957a0d3ef8d72121e14c2192dd4c850a6d23260f4af7628a0f7d315cd5 12.76MB / 12.76MB                                                                                                      16.6s
 => => sha256:f980252f101c8e101fb7eaf3484368e7b8dafa6b0916d0b3b789fff6ca118d7b 491B / 491B                                                                                                            17.3s
 => => sha256:cec826ed051f8732e0eaac550d1abac825fc88e974353898e410edbbed328abe 11.65MB / 11.65MB                                                                                                      32.7s
 => => sha256:f32bf70a2728ee874eeed22b4255e1ac2dafd1013b0b7fdcc61a317b74c0a1a8 2.46kB / 2.46kB                                                                                                        22.6s
 => => sha256:fa52dd2fd272b386987074a297f1e316b952231693a4bb0d1a82536df2d2ae90 245B / 245B                                                                                                            23.1s
 => => sha256:6feeb9df6b67b9d955737691d645a4b29223fd434890650a161d6afb27a3c80e 894B / 894B                                                                                                            23.9s
 => => extracting sha256:a52439f351543dbca787c3477a8a818967bcedc1c39976df5f1abf6ccf6b1270                                                                                                              1.9s
 => => extracting sha256:7b2675dd3270d646cc9609f7620fb3ee1b137cf246173d31b605f21c9162fb00                                                                                                              0.0s
 => => extracting sha256:37ad28fcd1b0bc7e479077bf6e839e44869e60ebea916fabfd682f1274093421                                                                                                              0.3s
 => => extracting sha256:0d265bb4013040b30cb0e5e0389c7d9125c6028ac19035bd68d2175bcedc11bf                                                                                                              0.0s
 => => extracting sha256:34c24de3ade9ec7b21b5c01ed31a77c990a79bd3dcf467a278892fe158aec1e3                                                                                                              0.0s
 => => extracting sha256:2f45d7957a0d3ef8d72121e14c2192dd4c850a6d23260f4af7628a0f7d315cd5                                                                                                              0.0s
 => => extracting sha256:f980252f101c8e101fb7eaf3484368e7b8dafa6b0916d0b3b789fff6ca118d7b                                                                                                              0.0s
 => => extracting sha256:cec826ed051f8732e0eaac550d1abac825fc88e974353898e410edbbed328abe                                                                                                              0.3s
 => => extracting sha256:f32bf70a2728ee874eeed22b4255e1ac2dafd1013b0b7fdcc61a317b74c0a1a8                                                                                                              0.0s
 => => extracting sha256:fa52dd2fd272b386987074a297f1e316b952231693a4bb0d1a82536df2d2ae90                                                                                                              0.0s
 => => extracting sha256:6feeb9df6b67b9d955737691d645a4b29223fd434890650a161d6afb27a3c80e                                                                                                              0.0s
 => [phpmyfaq internal] load build context                                                                                                                                                             0.0s
 => => transferring context: 7.22kB                                                                                                                                                                    0.0s
 => [phpmyfaq  2/12] RUN set -x  && buildDeps="libpng-dev libjpeg-dev libfreetype6-dev"  && apt-get update && apt-get install -y ${buildDeps} --no-install-recommends   && docker-php-ext-configure   17.0s
 => ERROR [phpmyfaq  3/12] RUN set -x  && buildDeps="libldap2-dev"  && apt-get update && apt-get install -y ${buildDeps} --no-install-recommends   && docker-php-ext-configure ldap --with-libdir=lib  5.5s
------                                                                                                                                                                                                      
 > [phpmyfaq  3/12] RUN set -x  && buildDeps="libldap2-dev"  && apt-get update && apt-get install -y ${buildDeps} --no-install-recommends   && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/  && docker-php-ext-install ldap   && apt-get purge -y ${buildDeps}  && rm -rf /var/lib/apt/lists/*:                                                                                                    
0.285 + buildDeps=libldap2-dev                                                                                                                                                                              
0.285 + apt-get update                                                                                                                                                                                      
0.366 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]                                                                                                                                        
0.462 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
0.487 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
0.514 Get:4 http://deb.debian.org/debian bookworm/main arm64 Packages [8681 kB]
2.000 Get:5 http://deb.debian.org/debian bookworm-updates/main arm64 Packages [6408 B]
2.000 Get:6 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages [90.0 kB]
2.556 Fetched 9028 kB in 2s (3996 kB/s)
2.556 Reading package lists...
2.804 + apt-get install -y libldap2-dev --no-install-recommends
2.807 Reading package lists...
3.057 Building dependency tree...
3.118 Reading state information...
3.189 The following packages were automatically installed and are no longer required:
3.190   libbrotli-dev libfreetype6 libjpeg62-turbo libjpeg62-turbo-dev libpng16-16
3.190   zlib1g-dev
3.190 Use 'apt autoremove' to remove them.
3.190 The following additional packages will be installed:
3.190   libldap-dev
3.208 The following NEW packages will be installed:
3.208   libldap-dev libldap2-dev
3.275 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
3.275 Need to get 318 kB of archives.
3.275 After this operation, 1709 kB of additional disk space will be used.
3.275 Get:1 http://deb.debian.org/debian bookworm/main arm64 libldap-dev arm64 2.5.13+dfsg-5 [295 kB]
3.370 Get:2 http://deb.debian.org/debian bookworm/main arm64 libldap2-dev all 2.5.13+dfsg-5 [22.6 kB]
3.450 debconf: delaying package configuration, since apt-utils is not installed
3.463 Fetched 318 kB in 0s (1949 kB/s)
3.470 Selecting previously unselected package libldap-dev:arm64.
(Reading database ... 14286 files and directories currently installed.)
3.476 Preparing to unpack .../libldap-dev_2.5.13+dfsg-5_arm64.deb ...
3.477 Unpacking libldap-dev:arm64 (2.5.13+dfsg-5) ...
3.504 Selecting previously unselected package libldap2-dev.
3.505 Preparing to unpack .../libldap2-dev_2.5.13+dfsg-5_all.deb ...
3.505 Unpacking libldap2-dev (2.5.13+dfsg-5) ...
3.517 Setting up libldap-dev:arm64 (2.5.13+dfsg-5) ...
3.520 Setting up libldap2-dev (2.5.13+dfsg-5) ...
3.529 + docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/
4.593 Configuring for:
4.593 PHP Api Version:         20230831
4.593 Zend Module Api No:      20230831
4.593 Zend Extension Api No:   420230831
4.919 checking for grep that handles long lines and -e... /usr/bin/grep
4.920 checking for egrep... /usr/bin/grep -E
4.921 checking for a sed that does not truncate output... /usr/bin/sed
4.935 checking for pkg-config... /usr/bin/pkg-config
4.936 checking pkg-config is at least version 0.9.0... yes
4.936 checking for cc... cc
4.949 checking whether the C compiler works... yes
4.970 checking for C compiler default output file name... a.out
4.970 checking for suffix of executables... 
4.990 checking whether we are cross compiling... no
5.013 checking for suffix of object files... o
5.025 checking whether the compiler supports GNU C... yes
5.036 checking whether cc accepts -g... yes
5.048 checking for cc option to enable C11 features... none needed
5.075 checking how to run the C preprocessor... cc -E
5.106 checking for icc... no
5.112 checking for suncc... no
5.118 checking for system library directory... lib/x86_64-linux-gnu/
5.118 checking if compiler supports -Wl,-rpath,... yes
5.141 checking build system type... aarch64-unknown-linux-gnu
5.144 checking host system type... aarch64-unknown-linux-gnu
5.144 checking target system type... aarch64-unknown-linux-gnu
5.162 checking for PHP prefix... /usr/local
5.162 checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
5.162 checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20230831
5.162 checking for PHP installed headers prefix... /usr/local/include/php
5.162 checking if debug is enabled... no
5.172 checking if zts is enabled... no
5.181 checking for gawk... no
5.181 checking for nawk... nawk
5.181 checking if nawk is broken... no
5.182 checking for LDAP support... yes, shared
5.182 checking whether to build with LDAP Cyrus SASL support... no
5.185 checking for stdio.h... yes
5.195 checking for stdlib.h... yes
5.208 checking for string.h... yes
5.221 checking for inttypes.h... yes
5.235 checking for stdint.h... yes
5.248 checking for strings.h... yes
5.262 checking for sys/stat.h... yes
5.276 checking for sys/types.h... yes
5.290 checking for unistd.h... yes
5.305 checking size of long... 8
5.339 checking if we're at 64-bit platform... yes
5.340 checking for stdio.h... (cached) yes
5.340 checking for stdlib.h... (cached) yes
5.341 checking for string.h... (cached) yes
5.341 checking for inttypes.h... (cached) yes
5.341 checking for stdint.h... (cached) yes
5.341 checking for strings.h... (cached) yes
5.341 checking for sys/stat.h... (cached) yes
5.341 checking for sys/types.h... (cached) yes
5.341 checking for unistd.h... (cached) yes
5.342 configure: error: Cannot find ldap libraries in /usr/lib/x86_64-linux-gnu/.
------
failed to solve: process "/bin/sh -c set -x  && buildDeps=\"libldap2-dev\"  && apt-get update && apt-get install -y ${buildDeps} --no-install-recommends   && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/  && docker-php-ext-install ldap   && apt-get purge -y ${buildDeps}  && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 1
@thorsten
Copy link
Owner

thorsten commented Nov 1, 2023

Looks like apt-get could not fetch the LDAP library during the build process. Is this reproduceable?

@nugatritter
Copy link
Author

Looks like apt-get could not fetch the LDAP library during the build process. Is this reproduceable?

I'll change the network and try it again. I will keep you posted.

@thorsten thorsten self-assigned this Nov 1, 2023
@thorsten thorsten added this to the 4.0 milestone Nov 1, 2023
@thorsten
Copy link
Owner

thorsten commented Nov 1, 2023

I deleted my own current container and tried it on my machine again. It worked as expected.

@nugatritter
Copy link
Author

Yep, all works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

2 participants