testemail / Dockerfile
chandugeesala0's picture
Update Dockerfile
31a7fb7 verified
raw
history blame contribute delete
720 Bytes
FROM rust:latest as builder
# Install dependencies
RUN apt-get update && apt-get install -y pkg-config libssl-dev
# Clone and build from source
RUN git clone https://github.com/reacherhq/check-if-email-exists.git /app
WORKDIR /app/backend
# Delete the problematic lock file and let cargo regenerate it
RUN rm ../Cargo.lock
# Build the project
RUN cargo build --release
# Runtime stage
FROM debian:bullseye-slim
# Install runtime dependencies
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
# Copy the binary
COPY --from=builder /app/target/release/reacher /usr/local/bin/reacher
EXPOSE 7860
CMD ["/usr/local/bin/reacher", "--http-host", "0.0.0.0", "--http-port", "7860"]