forked from kanidm/webauthn-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (25 loc) · 818 Bytes
/
Dockerfile
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
34
35
ARG BASE_IMAGE=opensuse/leap:latest
FROM ${BASE_IMAGE} AS builder
LABEL maintainer wbrown@suse.de
RUN mkdir /src
WORKDIR /src
ADD ./ /src/
RUN zypper in -y gcc libopenssl-devel openssl wget && \
wget https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init && \
chmod +x rustup-init && \
./rustup-init -v -y && \
source /root/.profile && \
cargo build --example tide --release
FROM ${BASE_IMAGE}
LABEL maintainer wbrown@suse.de
RUN zypper ref && \
zypper install -y \
timezone && \
zypper clean -a
COPY --from=builder /src/target/release/examples/tide /sbin/
# COPY --from=builder /src/static /static
COPY --from=builder /src/pkg /pkg
COPY --from=builder /src/templates /templates
EXPOSE 8080
WORKDIR /
CMD ["/sbin/tide", "-d", "-b", "0.0.0.0:8080"]