-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a82e7be
commit 358ac58
Showing
1 changed file
with
17 additions
and
7 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 |
---|---|---|
@@ -1,13 +1,23 @@ | ||
FROM rust:slim | ||
FROM rust:slim as builder | ||
|
||
WORKDIR /src | ||
|
||
COPY fl-server /src/fl-server | ||
COPY rfs /src/rfs | ||
COPY docker2fl /src/docker2fl | ||
COPY Cargo.toml . | ||
COPY Cargo.lock . | ||
COPY config.toml . | ||
|
||
RUN apt-get update && apt-get install curl build-essential libssl-dev musl-tools -y | ||
RUN rustup target add x86_64-unknown-linux-musl | ||
RUN cargo build --release --bin fl-server --target=x86_64-unknown-linux-musl | ||
|
||
WORKDIR /myapp | ||
FROM alpine:3.19 | ||
|
||
COPY . . | ||
WORKDIR /app | ||
|
||
RUN rustup target add x86_64-unknown-linux-musl | ||
RUN cargo build --release --target=x86_64-unknown-linux-musl | ||
COPY --from=builder /src/target/x86_64-unknown-linux-musl/release/fl-server . | ||
COPY --from=builder /src/config.toml . | ||
|
||
CMD ["/myapp/target/x86_64-unknown-linux-musl/release/fl-server", "--config-path", "config.toml"] | ||
EXPOSE 3000 | ||
ENTRYPOINT [ "./fl-server", "--config-path", "config.toml"] |