-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM rust:1.75-alpine3.19 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 cargo build --release --bin listener | ||
|
||
# Criando um novo stage com imagem scratch e passando apenas os | ||
# arquivos necessarios | ||
FROM scratch as production | ||
COPY --from=builder /usr/src/tech-challenge/target/release / | ||
ENTRYPOINT [ "/listener" ] | ||
EXPOSE 3000 |