diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d49cfb3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM rust:1.79-alpine3.20 AS builder + +# Feature apenas em nightly +RUN rustup update nightly + +RUN rustup default nightly + +# Definindo a pasta dentro do container onde +WORKDIR /usr/src/tech-challenge + +# Install necessary packages for building Rust applications and OpenSSL development headers +RUN apk add musl-dev openssl-dev + +COPY . . + +RUN apk --update add ca-certificates + +RUN cargo build --release + +RUN cargo build --release +ENTRYPOINT [ "/usr/src/tech-challenge/target/release/api" ] +EXPOSE 3000 \ No newline at end of file