mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
41 lines
1.6 KiB
Docker
41 lines
1.6 KiB
Docker
FROM docker.io/rust:1.73@sha256:25fa7a9aa4dadf6a466373822009b5361685604dbe151b030182301f1a3c2f58 AS builder
|
|
ARG VERSION=v0.5.0 # renovate: datasource=github-releases depName=lldap/lldap
|
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
|
git gzip wget
|
|
|
|
RUN cargo install wasm-pack && rustup target add wasm32-unknown-unknown
|
|
|
|
RUN git clone https://github.com/lldap/lldap.git /lldap && \
|
|
cd /lldap && git reset --hard ${VERSION} && \
|
|
cargo build --release -p lldap \
|
|
-p lldap_migration_tool \
|
|
-p lldap_set_password
|
|
|
|
RUN /lldap/app/build.sh && 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:bookworm-slim@sha256:f80c45482c8d147da87613cb6878a7238b8642bcc24fc11bad78c7bec726f340
|
|
|
|
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/lldap_migration_tool \
|
|
/lldap/target/release/lldap_set_password \
|
|
/opt/lldap/
|
|
|
|
COPY container/config /etc/lldap
|
|
COPY container/run-lldap /run-lldap
|
|
|
|
EXPOSE 3890 8080
|
|
ENTRYPOINT ["/run-lldap"]
|