first commit
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
# Build stage
|
||||
FROM rust:alpine AS builder
|
||||
RUN apk add --no-cache pkgconfig
|
||||
RUN apk add --no-cache openssl-dev musl-dev
|
||||
RUN apk add --no-cache openssl-libs-static
|
||||
ARG build="cargo build --release"
|
||||
COPY Cargo.toml /app/Cargo.toml
|
||||
COPY src /app/src
|
||||
WORKDIR "/app"
|
||||
RUN $build
|
||||
|
||||
# Runtime stage
|
||||
FROM alpine:latest
|
||||
RUN apk add --no-cache libgcc
|
||||
RUN apk add --no-cache openssl-libs-static
|
||||
ARG binary="/app/target/release/client"
|
||||
ARG target="/usr/local/bin/client"
|
||||
COPY --from=builder $binary $target
|
||||
WORKDIR "/root"
|
||||
CMD ["client"]
|
||||
Reference in New Issue
Block a user