-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathSMTP.Dockerfile
More file actions
37 lines (27 loc) · 972 Bytes
/
SMTP.Dockerfile
File metadata and controls
37 lines (27 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Use the official Rust image as a base image for building
FROM rust:latest AS builder
# Set the working directory inside the container
WORKDIR /app
# Clone the GitHub repository
RUN git clone https://github.com/zkemail/relayer-smtp.git
# Change to the directory of the cloned repository
WORKDIR /app/relayer-smtp
# Build the Rust package
RUN cargo build --release
# Use a smaller base image for the final stage
FROM debian:bookworm-slim
# Install necessary runtime dependencies and setup SSL certificates
RUN apt-get update && apt-get install -y \
libssl3 \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates
# Set the working directory inside the container
WORKDIR /app
# Copy the built binary from the builder stage
COPY --from=builder /app/relayer-smtp/target/release/relayer-smtp /app/relayer-smtp
# Expose port
EXPOSE 3000
# Specify the command to run when the container starts
CMD ["/app/relayer-smtp"]