2023-09-12 22:00:49 +02:00
|
|
|
FROM rust:alpine as build
|
|
|
|
|
|
|
|
ENV RUSTFLAGS='-C target-feature=-crt-static'
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN apk add --no-cache musl-dev
|
|
|
|
RUN cargo install --path . -j $(nproc)
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
2023-09-12 22:31:57 +02:00
|
|
|
COPY --from=build /usr/local/cargo/bin/$REPO_NAME_LOWER /app/$REPO_NAME_LOWER
|
2023-09-12 22:00:49 +02:00
|
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache libgcc
|
|
|
|
|
2023-09-12 22:31:57 +02:00
|
|
|
CMD ["./${REPO_NAME_LOWER}"]
|