peering-manager / docker

🐳 Docker Image of Peering Manager
Apache License 2.0
9 stars 13 forks source link

LDAP libs not properly installed #13

Closed jamesditrapani closed 3 years ago

jamesditrapani commented 3 years ago

LDAP libs are not properly installed in the latest Docker image:

root@12e4fd9ca22d:/opt/peering-manager# dpkg --list | grep libldap
root@12e4fd9ca22d:/opt/peering-manager# 
root@12e4fd9ca22d:/var/log# cat apt/history.log | grep libldap2-dev
root@12e4fd9ca22d:/var/log#

Fixed by manually running the apt-get install lines from the dockerfile within the container:

root@12e4fd9ca22d:/opt/peering-manager# apt-get update -y \
>     && apt-get install -y \
>        build-essential \
>        python3-dev \
>        libldap2-dev \
>        libsasl2-dev \
>        libssl-dev \
>        libxml2-dev \
>        libxslt1-dev \
>        zlib1g-dev

Can't seem to locate anywhere in the Docker hub image where we attempt to install libldap2-dev https://hub.docker.com/layers/peeringmanager/peering-manager/latest/images/sha256-1d[…]a32a7e0e04db6d1e284e52c4f527a6831fcdb6f5e9ced?context=explore

gmazoyer commented 3 years ago

This is probably due to the two stages build.

Adding the required packages to https://github.com/peering-manager/docker/blob/bb5c314806f0ebb9a69076781780d528db7d2701/Dockerfile#L37 should fix it.

mngan commented 3 years ago

It looks like you need to add libldap-2.4.2 to the apt packages. Unfortunately, there isn't a meta package for this. Alternatively, you can just use libldap-dev but this will install all the header files as well as the run time library. I was curious about the other build dependencies, but it looks like the xml/xslt dependencies are statically linked, and there doesn't seem to be a dependency for the shared libraries. I'll submit a PR for this.

mngan commented 3 years ago

PR Submitted

jamesditrapani commented 3 years ago

PR merged, will test this morning once new image is published.

jamesditrapani commented 3 years ago

Worked well, closing down