-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Migrated from debian image to alpine
- Loading branch information
Showing
1 changed file
with
9 additions
and
6 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 |
---|---|---|
@@ -1,15 +1,18 @@ | ||
# Build Stage | ||
FROM rust:slim-buster AS builder | ||
FROM rust:1-alpine AS builder | ||
WORKDIR /build | ||
RUN apt-get update && apt-get upgrade -y | ||
RUN apt-get install -y libpq-dev libssl-dev protobuf-compiler pkg-config | ||
RUN apk update | ||
RUN apk upgrade | ||
ENV RUSTFLAGS="-C target-feature=-crt-static" | ||
RUN apk add llvm cmake gcc ca-certificates libc-dev pkgconfig openssl-dev protoc libpq-dev musl-dev | ||
COPY . . | ||
RUN cargo build --release | ||
|
||
FROM rust:slim-buster | ||
FROM rust:1-alpine | ||
WORKDIR /run | ||
RUN apt-get update && apt-get upgrade -y | ||
RUN apt-get install -y libpq-dev libssl-dev pkg-config ca-certificates | ||
RUN apk update | ||
RUN apk upgrade | ||
RUN apk add llvm cmake gcc ca-certificates libc-dev pkgconfig openssl-dev protoc libpq-dev musl-dev | ||
COPY --from=builder /build/target/release/aruna_server . | ||
COPY ./config/config.toml ./config/config.toml | ||
CMD [ "/run/aruna_server" ] |