blob: 66fad040e1fbf9e2d32c35025fb0e9b677841c4e (
plain) (
blame)
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
36
37
38
39
40
41
|
FROM rust:latest as builder
RUN update-ca-certificates
# ENV USER=locus
# ENV UID=10001
# RUN adduser \
# --disabled-password \
# --gecos "" \
# --home "/nonexistent" \
# --shell "/sbin/nologin" \
# --no-create-home \
# --uid "${UID}" \
# "${USER}"
WORKDIR /locus
COPY ./ ./
RUN cargo build --release
RUN strip -s /locus/target/release/locus
FROM debian:buster-slim
RUN apt-get update && apt-get install -y libssl-dev
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group
WORKDIR /locus
COPY --from=builder /locus/target/release/locus ./
COPY --from=builder /locus/content ./content
# USER locus:locus
EXPOSE 1965
CMD ["./locus"]
|