File tree Expand file tree Collapse file tree 1 file changed +11
-16
lines changed
Expand file tree Collapse file tree 1 file changed +11
-16
lines changed Original file line number Diff line number Diff line change 11# --- Build Stage ---
2- # Use the official Go image to build the application
3- FROM golang:1.21-alpine AS builder
4-
5- # Install Git, which is needed to download the source code
6- RUN apk add --no-cache git
2+ # Use the official Rust image to compile the application
3+ FROM rust:latest AS builder
74
5+ # Create a new, empty project
86WORKDIR /app
97
10- # Download and compile the doh-server application
11- RUN go install github.com/dnscrypt/doh-server/cmd/doh-server@latest
8+ # Install the doh-proxy binary. The --no-default-features flag is crucial
9+ # as it builds the version without built-in HTTPS, which is what we need
10+ # when running behind a reverse proxy like Nginx.
11+ RUN cargo install doh-proxy --no-default-features
1212
1313
1414# --- Final Stage ---
15- # Use a minimal Alpine image for the final container
15+ # Use a minimal Alpine image for a small final container size
1616FROM alpine:latest
1717
18- WORKDIR /app
19-
20- # Copy the compiled doh-server application from the build stage
21- COPY --from=builder /go/bin/doh-server .
22-
23- # Expose the internal port the server will listen on
24- EXPOSE 8053
18+ # Copy the compiled doh-proxy application from the build stage
19+ COPY --from=builder /usr/local/cargo/bin/doh-proxy /usr/local/bin/
2520
2621# Set the command to run when the container starts
27- ENTRYPOINT [ "./ doh-server " ]
22+ ENTRYPOINT [ "doh-proxy " ]
You can’t perform that action at this time.
0 commit comments