31 lines
1010 B
Docker
31 lines
1010 B
Docker
FROM alpine AS ldap2pg
|
|
|
|
ARG LDAP2PG_VERSION=6.0
|
|
|
|
RUN set -eux &&\
|
|
cd /tmp &&\
|
|
apk --no-cache add ca-certificates curl &&\
|
|
curl -sSLO https://github.com/dalibo/ldap2pg/releases/download/v${LDAP2PG_VERSION}/ldap2pg_${LDAP2PG_VERSION}_linux_amd64.tar.gz &&\
|
|
curl -sSLO https://github.com/dalibo/ldap2pg/releases/download/v${LDAP2PG_VERSION}/ldap2pg_${LDAP2PG_VERSION}_checksums.txt &&\
|
|
grep ldap2pg_${LDAP2PG_VERSION}_linux_amd64.tar.gz ldap2pg_${LDAP2PG_VERSION}_checksums.txt | sha256sum -c &&\
|
|
tar xvzf ldap2pg_${LDAP2PG_VERSION}_linux_amd64.tar.gz &&\
|
|
chown root:root ldap2pg &&\
|
|
chmod 755 ldap2pg
|
|
|
|
FROM danielberteaud/alpine:24.2-1
|
|
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
|
|
|
|
ENV PGHOST=localhost \
|
|
PGPORT=5432 \
|
|
PGUSER=postgres \
|
|
LDAP2PG_MODE=dry \
|
|
LDAP2PG_CRON=
|
|
|
|
COPY --from=ldap2pg /tmp/ldap2pg /usr/local/bin/ldap2pg
|
|
RUN set -eux &&\
|
|
apk --no-cache upgrade &&\
|
|
apk --no-cache add postgresql16-client ca-certificates
|
|
COPY root/ /
|
|
|
|
CMD ["run.sh"]
|