2020-04-10 07:50:45 +02:00
|
|
|
FROM opensuse/tumbleweed:latest AS ref_repo
|
2020-01-02 08:54:50 +01:00
|
|
|
RUN zypper mr -d repo-non-oss && \
|
|
|
|
zypper mr -d repo-oss && \
|
|
|
|
zypper mr -d repo-update && \
|
|
|
|
zypper ar https://download.opensuse.org/update/tumbleweed/ repo-update-https && \
|
|
|
|
zypper ar https://download.opensuse.org/tumbleweed/repo/oss/ repo-oss-https && \
|
|
|
|
zypper ar https://download.opensuse.org/tumbleweed/repo/non-oss/ repo-non-oss-https && \
|
2020-04-10 07:50:45 +02:00
|
|
|
zypper ref
|
|
|
|
|
|
|
|
# // setup the builder pkgs
|
|
|
|
FROM ref_repo AS build_base
|
|
|
|
RUN zypper install -y cargo rust gcc sqlite3-devel libopenssl-devel pam-devel
|
|
|
|
|
|
|
|
# // setup the runner pkgs
|
|
|
|
FROM ref_repo AS run_base
|
|
|
|
RUN zypper install -y sqlite3 openssl timezone pam
|
|
|
|
|
|
|
|
# // build artifacts
|
|
|
|
FROM build_base AS builder
|
|
|
|
|
2019-09-14 15:44:08 +02:00
|
|
|
COPY . /home/kanidm/
|
|
|
|
WORKDIR /home/kanidm/
|
2019-12-03 07:03:05 +01:00
|
|
|
RUN cargo build --release
|
2018-12-27 06:22:03 +01:00
|
|
|
|
2020-01-02 08:54:50 +01:00
|
|
|
# == end builder setup, we now have static artifacts.
|
2020-04-10 07:50:45 +02:00
|
|
|
FROM run_base
|
|
|
|
MAINTAINER william@blackhats.net.au
|
2020-01-02 08:54:50 +01:00
|
|
|
EXPOSE 8443
|
2018-12-27 06:22:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
ENV RUST_BACKTRACE 1
|
2020-01-02 08:54:50 +01:00
|
|
|
CMD ["/sbin/kanidmd", "server", "-D", "/data/kanidm.db", "-C", "/data/ca.pem", "-c", "/data/cert.pem", "-k", "/data/key.pem", "--bindaddr", "0.0.0.0:8443"]
|
2018-12-27 06:22:03 +01:00
|
|
|
|