LoginSignup
0
0

More than 1 year has passed since last update.

docker php-fpm に ldap拡張を組み込む

Last updated at Posted at 2021-07-24

デフォルトでは php-fpm なコンテナに ldap拡張が入ってないので組み込む場合の Dockerfile

FROM php:8-fpm

ARG UID=1000
ARG GID=1000
RUN useradd -m -u ${UID} docker
# node.js for yarn
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs

# yarn (webpack etc,...)
RUN apt remove cmdtest && apt remove yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update \ 
    && apt-get install -y libldb-dev libldap2-dev \
    && ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so \ 
    && ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so \
    && apt-get install yarn \
    && docker-php-ext-install pdo_mysql ldap \
    && apt install -y git unzip

USER ${UID}:${GID}
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0