-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (24 loc) · 1008 Bytes
/
Dockerfile
File metadata and controls
35 lines (24 loc) · 1008 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
FROM rust:1-bookworm AS builder
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
COPY src ./src
COPY benches ./benches
RUN apt-get update && apt-get install -y pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*
RUN cargo build --release && strip target/release/soli-proxy
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -r -s /bin/false soli-proxy && \
mkdir -p /etc/soli-proxy/run /etc/soli-proxy/sites /etc/soli-proxy/certs && \
chown -R soli-proxy:soli-proxy /etc/soli-proxy
COPY --from=builder /app/target/release/soli-proxy /usr/local/bin/soli-proxy
COPY --from=builder /app/target/release/soli-proxy /usr/local/bin/soli-proxy-backup
RUN apt-get update && apt-get install -y --no-install-recommends \
libcurl4 \
&& rm -rf /var/lib/apt/lists/*
USER soli-proxy
EXPOSE 80 443 9090
ENTRYPOINT ["soli-proxy"]
CMD ["--config", "/etc/soli-proxy/config.toml"]