mirror of
https://github.com/NexVeridian/ark-invest-api-rust.git
synced 2025-09-02 01:49:11 +00:00
1.0.0
This commit is contained in:
commit
3a34f6c1a3
12 changed files with 705 additions and 0 deletions
23
Dockerfile
Normal file
23
Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
|||
FROM rust:latest AS builder
|
||||
|
||||
RUN rustup target add x86_64-unknown-linux-musl && apt update && apt install -y musl-tools musl-dev
|
||||
|
||||
WORKDIR /ark-invest-api-rust
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN --mount=type=cache,target=/usr/local/cargo,from=rust,source=/usr/local/cargo \
|
||||
--mount=type=cache,target=./target \
|
||||
cargo build --target x86_64-unknown-linux-musl --release && \
|
||||
cp ./target/x86_64-unknown-linux-musl/release/ark-invest-api-rust .
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
WORKDIR /ark-invest-api-rust
|
||||
|
||||
COPY --from=builder ark-invest-api-rust/ark-invest-api-rust .
|
||||
|
||||
ENV PORT=3000
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["./ark-invest-api-rust"]
|
Loading…
Add table
Add a link
Reference in a new issue