-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Frank Yang <[email protected]>
- Loading branch information
1 parent
9169642
commit 3c9d5ae
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM rust:1.61 as builder | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
RUN cargo build --release --all-features --bin bindle-server | ||
|
||
FROM rust:1.61-slim-buster | ||
|
||
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters