Skip to content

Commit

Permalink
feat: Migrated from debian image to alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
St4NNi committed Feb 28, 2023
1 parent c403674 commit df0e8d0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Dockerfile
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" ]

0 comments on commit df0e8d0

Please sign in to comment.