pimcore / docker

73 stars 49 forks source link

`php: symbol lookup error` after new images have been pulled #121

Closed CodeBrauer closed 1 year ago

CodeBrauer commented 1 year ago

After the latest docker image release, pimcore installer does not work anymore.

Steps to reproduce:

wget https://raw.githubusercontent.com/pimcore/skeleton/10.2/docker-compose.yaml
docker-compose exec php composer create-project pimcore/skeleton my-project
docker-compose exec php composer install
docker-compose exec php vendor/bin/pimcore-install -vvv

After entering the admin & DB credentials, the installation is aborted with the following message:

php: symbol lookup error: /usr/local/lib/libMagickCore-7.Q16HDRI.so.10: undefined symbol: heif_init

As I found there was some issue in the last version, with heic, I just run ldconfig /usr/local/lib and after this, php was working normally again.

Host OS: OS X 12.6 CPU: Apple M1 Pro (arm64) Docker Desktop 4.15.0 (93002) Docker Compose version v2.13.0

dpfaffenbauer commented 1 year ago

please try with 1.2

CodeBrauer commented 1 year ago

The linked docker-compose uses pimcore/pimcore:php8.1-debug-latest - this should be 1.2?

dpfaffenbauer commented 1 year ago

did you pull the latest version? try with docker compose pull

CodeBrauer commented 1 year ago

This was freshly set up. (Docker images pulled just today, no cache) docker inspect 61d620595334:

[
    {
        "Id": "sha256:61d6205953342550909e5f000239aff3938226a638f3a9d2e727de7886473527",
        "RepoTags": [
            "pimcore/pimcore:php8.1-debug-latest"
        ],
        "RepoDigests": [
            "pimcore/pimcore@sha256:53961d1898eacb3f362c1b84b01e3c77d5214f123e344957916b024c5078f75c"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2023-01-12T06:21:27.270887029Z",
        "Container": "",
dpfaffenbauer commented 1 year ago

Latest is b01f35557f21a6575d98107cd84e4f540cd46623ad3cc804deafe69e0baaa092 https://hub.docker.com/r/pimcore/pimcore/tags?page=1&name=php8.1-debug-latest, https://hub.docker.com/layers/pimcore/pimcore/php8.1-debug-latest/images/sha256-b01f35557f21a6575d98107cd84e4f540cd46623ad3cc804deafe69e0baaa092?context=explore

CodeBrauer commented 1 year ago

That's weird. For whatever reason, the latest image is not loaded?

docker pull pimcore/pimcore:php8.1-debug-latest

php8.1-debug-latest: Pulling from pimcore/pimcore
Digest: sha256:53961d1898eacb3f362c1b84b01e3c77d5214f123e344957916b024c5078f75c
Status: Image is up to date for pimcore/pimcore:php8.1-debug-latest
docker.io/pimcore/pimcore:php8.1-debug-latest

And check the images: docker-compose images

          Container                Repository                 Tag                Image Id       Size
------------------------------------------------------------------------------------------------------
docker-issue-db-1            mariadb           10.7                        5b635d255292   390.5 MB
docker-issue-nginx-1         nginx             stable-alpine               89713778d756   22.13 MB
docker-issue-php-1           pimcore/pimcore   php8.1-debug-latest         61d620595334   2.658 GB
docker-issue-redis-1         redis             alpine                      faced132af8d   30.31 MB
docker-issue-supervisord-1   pimcore/pimcore   php8.1-supervisord-latest   0f7602c527bb   2.672 GB

docker inspect 61d620595334

[
    {
        "Id": "sha256:61d6205953342550909e5f000239aff3938226a638f3a9d2e727de7886473527",
        "RepoTags": [
            "pimcore/pimcore:php8.1-debug-latest"
        ],
        "RepoDigests": [
            "pimcore/pimcore@sha256:53961d1898eacb3f362c1b84b01e3c77d5214f123e344957916b024c5078f75c"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2023-01-12T06:21:27.270887029Z",
        "Container": "",

After docker-compose down -v --rmi all --remove-orphans and docker compose up again, the wrong image.

After pulling the image manually: docker pull pimcore/pimcore@sha256:b01f35557f21a6575d98107cd84e4f540cd46623ad3cc804deafe69e0baaa092

docker inspect 61d620595334

[
    {
        "Id": "sha256:61d6205953342550909e5f000239aff3938226a638f3a9d2e727de7886473527",
        "RepoTags": [
            "pimcore/pimcore:php8.1-debug-latest"
        ],
        "RepoDigests": [
            "pimcore/pimcore@sha256:53961d1898eacb3f362c1b84b01e3c77d5214f123e344957916b024c5078f75c",
            "pimcore/pimcore@sha256:b01f35557f21a6575d98107cd84e4f540cd46623ad3cc804deafe69e0baaa092"
        ],

The wrong image is still being used?

dpfaffenbauer commented 1 year ago

can you try docker pull pimcore/pimcore:php8.1-debug-latest@sha256: b01f35557f21a6575d98107cd84e4f540cd46623ad3cc804deafe69e0baaa092

CodeBrauer commented 1 year ago
$ docker pull pimcore/pimcore:php8.1-debug-latest@sha256:b01f35557f21a6575d98107cd84e4f540cd46623ad3cc804deafe69e0baaa092

docker.io/pimcore/pimcore@sha256:b01f35557f21a6575d98107cd84e4f540cd46623ad3cc804deafe69e0baaa092: Pulling from pimcore/pimcore
934ce60d1040: Already exists
783d22fac3ea: Already exists
d4aa07095191: Already exists
0cdf93b070c8: Already exists
57990fa99faa: Already exists
a7a1b7ed0228: Already exists
28cf41e38ee6: Already exists
8e2ccd1d05f5: Already exists
ff1fd4c8b64b: Already exists
2b9e7dfbebad: Already exists
024bfc91b6c4: Already exists
d6f609307d2f: Already exists
7b3957bf9813: Already exists
e0c89881ab28: Already exists
4f4fb700ef54: Already exists
6abda1a0b304: Already exists
7a72504a6e32: Already exists
229188aa307c: Already exists
Digest: sha256:b01f35557f21a6575d98107cd84e4f540cd46623ad3cc804deafe69e0baaa092
Status: Downloaded newer image for pimcore/pimcore@sha256:b01f35557f21a6575d98107cd84e4f540cd46623ad3cc804deafe69e0baaa092
docker.io/pimcore/pimcore:php8.1-debug-latest@sha256:b01f35557f21a6575d98107cd84e4f540cd46623ad3cc804deafe69e0baaa092
dpfaffenbauer commented 1 year ago

and still not working for this version?

CodeBrauer commented 1 year ago

Sadly not, still the same error php: symbol lookup error: /usr/local/lib/libMagickCore-7.Q16HDRI.so.10: undefined symbol: heif_init

dpfaffenbauer commented 1 year ago

@brusch something super odd happening here, are you happy to revert https://github.com/pimcore/docker/pull/115?

CodeBrauer commented 1 year ago

My temporary fix:

docker-compose.yml

[...]
php-fpm:
        build: .docker/php
[...]

.docker/php

FROM pimcore/pimcore:php8.1-debug-v1
RUN ldconfig /usr/local/lib; sync;

Works fine.

dpfaffenbauer commented 1 year ago

yeah, it also works of you just do the ldconfig, but the docker build does that too... linkers are all fine, I have no idea what is going on. So better we revert to a slower, but stable version of libheif and wait until debian updates it.

CodeBrauer commented 1 year ago

What is even more weird, our pipeline works fine and gets the correct image. My only indication is that I have an arm64 system (macOS host) and the pipeline runs with amd64 (gitlab runner).

dpfaffenbauer commented 1 year ago

maybe it has todo with the qemu build, the arm64 image is not build natively. Github does not have any arm64 workflow runners..

CodeBrauer commented 1 year ago

Just to be complete: The problem with the wrong image was due to docker desktop 4.16.1

dpfaffenbauer commented 1 year ago

@CodeBrauer which change exactly?

CodeBrauer commented 1 year ago

Fixed an issue where docker build and docker tag commands produced an image already exists error if the containerd integration feature is enabled.

Since the update, the correct image got pulled hasslefree.

dpfaffenbauer commented 1 year ago

@CodeBrauer I don't think it is a docker-desktop issue to be honest...

CodeBrauer commented 1 year ago

@dpfaffenbauer What I mean is that the wrong image was pulled, which was also the problem at the beginning. The problem with the ARM image still exists and has nothing to do with docker-desktop.

brusch commented 1 year ago

@dpfaffenbauer yes, I'm ok with reverting https://github.com/pimcore/docker/pull/115, but we should further investigate this ... very weird behavior ...

studio1gmbh commented 1 year ago

@CodeBrauer we can also confirm the behaviour with ARM images. @brusch can we expect a revert of #115 soon? Since our development rely on this images, it really slows down some processes.

jdreesen commented 1 year ago

What about using v1.0 until it's fixed?

dpfaffenbauer commented 1 year ago

https://github.com/pimcore/docker/pull/123