forked from kanidm/libkrimes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (22 loc) · 819 Bytes
/
Dockerfile
File metadata and controls
34 lines (22 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM opensuse/leap:15.6 AS repos
RUN --mount=type=cache,id=zypp,target=/var/cache/zypp \
sed -i -E 's/https?:\/\/download.opensuse.org/https:\/\/mirror.firstyear.id.au/g' /etc/zypp/repos.d/*.repo && \
zypper mr -d -f repo-openh264 && \
zypper -v ref --force && \
zypper -v dup -y
FROM repos AS builder
RUN --mount=type=cache,id=zypp,target=/var/cache/zypp \
zypper --non-interactive in cargo
COPY . /usr/src/libkrimes
WORKDIR /usr/src/libkrimes
RUN cargo build --release
RUN --mount=type=cache,id=cargo,target=/cargo \
export CARGO_HOME=/cargo && \
cargo build \
--target-dir="/usr/src/libkrimes/target/" \
--release
FROM repos
COPY --from=builder /usr/src/libkrimes/target/release/krimedc /sbin/
EXPOSE 88/tcp
EXPOSE 88/udp
CMD [ "/sbin/krimedc", "run", "/data/krime.conf"]