1
0
mirror of https://github.com/actix/examples synced 2025-06-28 18:00:37 +02:00

Restructure folders (#411)

This commit is contained in:
Daniel T. Rodrigues
2021-02-25 21:57:58 -03:00
committed by GitHub
parent 9db98162b2
commit c3407627d0
334 changed files with 127 additions and 120 deletions

View File

@ -0,0 +1,24 @@
FROM rust:1-slim-buster AS base
ENV USER=root
WORKDIR /code
RUN cargo init
COPY Cargo.toml /code/Cargo.toml
RUN cargo fetch
COPY src /code/src
CMD [ "cargo", "test", "--offline" ]
FROM base AS builder
RUN cargo build --release --offline
FROM rust:1-slim-buster
COPY --from=builder /code/target/release/docker_sample /usr/bin/docker_sample
EXPOSE 5000
ENTRYPOINT [ "/usr/bin/docker_sample" ]