coreos-home-server/service/lldap/Containerfile
Alex Palaistras 01a8f60452 lldap: Move to binary for container build
Binary builds are now available for LLDAP, which simplifies and makes
the build process much quicker. In addition, multi-stage builds are
used, which again help with caching.
2024-01-03 17:05:30 +00:00

23 lines
1.0 KiB
Docker

FROM docker.io/debian:bookworm-slim@sha256:f80c45482c8d147da87613cb6878a7238b8642bcc24fc11bad78c7bec726f340 AS builder
ARG VERSION=0.5.0 # renovate: datasource=github-releases depName=lldap/lldap extractVersion=^v(?<version>.*)$
WORKDIR /src
ADD https://github.com/lldap/lldap/releases/download/v${VERSION}/amd64-lldap.tar.gz /src.tar.gz
RUN tar --no-same-owner --strip-components 1 -xvzf /src.tar.gz && \
install -D --mode 0755 -t /build/usr/bin /src/lldap /src/lldap_migration_tool /src/lldap_set_password && \
mkdir -p /build/usr/share && cp -R /src/app /build/usr/share/lldap
FROM docker.io/debian:bookworm-slim@sha256:f80c45482c8d147da87613cb6878a7238b8642bcc24fc11bad78c7bec726f340
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y --no-install-recommends \
ca-certificates gettext gosu
RUN adduser --system --group --uid 10000 --home /var/lib/lldap lldap
COPY --from=builder /build /
COPY container/config /etc/lldap
COPY container/run-lldap /run-lldap
EXPOSE 3890 8080
ENTRYPOINT ["/run-lldap"]