-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (18 loc) · 897 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
####################################################################################################
## Builder
####################################################################################################
FROM rust:alpine AS builder
RUN apk add --no-cache musl-dev
WORKDIR /listmonk-sync
COPY . .
RUN cargo build --target x86_64-unknown-linux-musl --release
####################################################################################################
## Final image
####################################################################################################
FROM alpine:latest
# Copy our build
COPY --from=builder /listmonk-sync/target/x86_64-unknown-linux-musl/release/listmonk-sync /usr/local/bin/listmonk-sync
# Use an unprivileged user
RUN adduser --home /nonexistent --no-create-home --disabled-password listmonk-sync
USER listmonk-sync
CMD ["listmonk-sync"]