Files
imphnen-backend-service/Dockerfile
T

38 lines
836 B
Docker
Raw Normal View History

2025-05-22 22:29:28 +07:00
FROM rust:1.85-slim-bullseye AS builder
2025-02-03 21:53:42 +07:00
RUN apt-get update && apt-get install -y \
2025-05-22 22:29:28 +07:00
curl \
2025-02-03 21:53:42 +07:00
build-essential \
libssl-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
2025-05-22 22:29:28 +07:00
COPY imphnen-backend ./imphnen-backend
COPY imphnen-cms ./imphnen-cms
COPY imphnen-dimentorin ./imphnen-dimentorin
COPY imphnen-entities ./imphnen-entities
COPY imphnen-gacha ./imphnen-gacha
COPY imphnen-gateway ./imphnen-gateway
COPY imphnen-iam ./imphnen-iam
COPY imphnen-libs ./imphnen-libs
COPY imphnen-middleware ./imphnen-middleware
COPY imphnen-utils ./imphnen-utils
COPY tests ./tests
RUN cargo fetch
RUN cargo build -p imphnen-backend --release \
&& strip target/release/api
2025-02-03 21:53:42 +07:00
FROM gcr.io/distroless/cc AS runner
WORKDIR /app
2025-05-22 22:29:28 +07:00
COPY --from=builder /app/target/release/api .
2025-02-03 21:53:42 +07:00
2025-05-22 22:29:28 +07:00
CMD ["/app/api"]