-
Notifications
You must be signed in to change notification settings - Fork 38
/
Dockerfile
24 lines (16 loc) · 636 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
FROM rust:1.64 as builder
WORKDIR /app
COPY . /app
RUN cargo build --release --all-features --bin bindle-server
FROM debian:bullseye-slim
ARG USERNAME=bindle
ARG USER_UID=1000
ARG USER_GID=$USER_UID
VOLUME [ "/bindle-data" ]
ENV BINDLE_IP_ADDRESS_PORT="0.0.0.0:8080"
ENV BINDLE_DIRECTORY="/bindle-data/bindles"
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
COPY --from=builder --chown=$USERNAME /app/target/release/bindle-server /usr/local/bin/bindle-server
USER $USERNAME
CMD ["/usr/local/bin/bindle-server", "--unauthenticated", "--keyring", "/bindle-data/keyring.toml"]