mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
Alex Palaistras
4294f1ec9c
This sets the stage for moving common authentication from IMAP/Dovecot to LDAP, which allows for more control over user information, as well as a basic form of RBAC. No services are currently set up to support LDAP -- support will follow soon after this commit.
37 lines
1.3 KiB
Docker
37 lines
1.3 KiB
Docker
FROM docker.io/rust:1.63 AS builder
|
|
ARG VERSION=8b01271e94671df88c68abbc69efb9bcec117498
|
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
|
git npm wget
|
|
|
|
RUN cargo install wasm-pack && rustup target add wasm32-unknown-unknown
|
|
RUN npm install -g rollup
|
|
|
|
RUN git clone https://github.com/nitnelave/lldap.git /lldap && \
|
|
cd /lldap && git reset --hard ${VERSION} && \
|
|
cargo build --release -p lldap -p migration-tool && app/build.sh
|
|
|
|
RUN cd /lldap/app/static && \
|
|
for file in $(cat libraries.txt); do wget "$file"; done && \
|
|
for file in $(cat fonts/fonts.txt); do wget -P fonts "$file"; done
|
|
|
|
FROM docker.io/debian:bullseye-slim
|
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
|
gettext gosu
|
|
|
|
RUN addgroup --system --gid 10000 lldap
|
|
RUN adduser --system --uid 10000 --ingroup lldap --home /var/lib/lldap lldap
|
|
RUN mkdir -p /opt/lldap/app
|
|
|
|
COPY --from=builder /lldap/app/index_local.html /opt/lldap/app/index.html
|
|
COPY --from=builder /lldap/app/static /opt/lldap/app/static
|
|
COPY --from=builder /lldap/app/pkg /opt/lldap/app/pkg
|
|
COPY --from=builder /lldap/target/release/lldap /lldap/target/release/migration-tool /opt/lldap
|
|
|
|
COPY container/config /etc/lldap
|
|
COPY container/run-lldap /run-lldap
|
|
|
|
EXPOSE 3890 8080
|
|
ENTRYPOINT ["/run-lldap"]
|