-
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
Gustavo Inacio
authored and
Gustavo Inacio
committed
Aug 11, 2023
1 parent
3916bb7
commit c91f64d
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
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,4 @@ | ||
.git/ | ||
devel/ | ||
.envrc | ||
target/ |
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,28 @@ | ||
FROM rust:1.71.0-alpine as app | ||
|
||
WORKDIR /app | ||
|
||
RUN apk add openssl-dev musl-dev musl g++ | ||
COPY . /app | ||
|
||
RUN \ | ||
--mount=type=cache,target=/app/target,rw \ | ||
--mount=type=cache,target=/usr/local/cargo/registry,rw \ | ||
cargo build --release && \ | ||
cp /app/target/release/elric-rs /app/elric-rs | ||
|
||
|
||
FROM alpine:3.17.3 | ||
|
||
RUN mkdir /app | ||
|
||
RUN apk add libc6-compat | ||
|
||
COPY --from=app /app/elric-rs /app/elric-rs | ||
|
||
WORKDIR /app | ||
|
||
ENTRYPOINT ["./elric-rs"] | ||
EXPOSE 3000 | ||
ENV RUST_LOG="info" | ||
ENV PORT="3000" |