Adambean / gitlab-ce-ldap-sync

Synchronise users and groups (including group members) from an LDAP instance with Gitlab CE (and EE in free tier) self-hosted instance(s).
Apache License 2.0
59 stars 23 forks source link

Dockerize #33

Open d0lb33 opened 1 year ago

d0lb33 commented 1 year ago

Would love to have this on docker hub. I wrote a little docker file that can probably be optimized, but works fine for me right now if you'd like to expand on it/add it to the project:

FROM php:7.4.9-cli-alpine3.12

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/

RUN apk update
RUN apk add bash
RUN apk add curl

# Install PHP extensions
RUN install-php-extensions ldap

# INSTALL COMPOSER
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer 

WORKDIR /app
COPY . .

RUN composer install

CMD ["php", "bin/console", "ldap:sync"]
Adambean commented 1 year ago

I've literally never used Docker, but feel free to send a PR up so you can retain credit. :)