Skip to content

Commit

Permalink
migration from alpine to debian
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxfight committed May 6, 2024
1 parent 6ca23b5 commit da4dbb1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
FROM rust:alpine as builder
FROM rust:slim-bookworm as builder

WORKDIR /app

RUN apk add --no-cache openssl-dev musl-dev
ENV OPENSSL_DIR=/usr
RUN apt update -y && apt install openssl libssl-dev pkg-config -y

COPY . .
RUN RUSTFLAGS='-C target-feature=-crt-static' cargo build --release
RUN cargo build --release

FROM alpine
FROM debian:bookworm-slim
WORKDIR /app

COPY --from=builder /app/target/release .
RUN apk add --no-cache libgcc libstdc++ openssl
RUN apt update -y && apt install openssl -y

ARG UID=10001
RUN adduser \
Expand Down

0 comments on commit da4dbb1

Please sign in to comment.