2023-04-02 16:53:55 -05:00
|
|
|
FROM rust:1 as build
|
2020-02-14 13:17:56 -06:00
|
|
|
|
2023-04-02 16:53:55 -05:00
|
|
|
RUN mkdir /actix
|
|
|
|
WORKDIR /actix
|
2020-02-14 13:17:56 -06:00
|
|
|
|
2023-04-02 16:53:55 -05:00
|
|
|
COPY ./actix/cargo.toml /actix/cargo.toml
|
|
|
|
COPY ./actix/cargo.lock /actix/cargo.lock
|
2020-02-14 13:17:56 -06:00
|
|
|
|
2023-04-02 16:53:55 -05:00
|
|
|
RUN cargo build --deps-only
|
2020-02-14 13:17:56 -06:00
|
|
|
|
2023-04-02 16:53:55 -05:00
|
|
|
COPY ./actix /actix
|
2020-02-14 13:17:56 -06:00
|
|
|
|
2023-04-02 16:53:55 -05:00
|
|
|
RUN cargo install --path .
|
|
|
|
|
|
|
|
FROM gcr.io/distroless/cc-debian10
|
|
|
|
|
|
|
|
EXPOSE 2000
|
|
|
|
|
|
|
|
COPY --from=build /usr/local/cargo/bin/actix /usr/local/bin/actix
|
|
|
|
|
|
|
|
CMD ["actix"]
|