-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.prebuilt
More file actions
37 lines (27 loc) · 1.12 KB
/
Copy pathDockerfile.prebuilt
File metadata and controls
37 lines (27 loc) · 1.12 KB
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
# NOTE: This image copies in a host-built binary (CI artifact). To avoid
# runtime failures like:
# /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found
# we use Debian trixie (glibc 2.38+) instead of Debian bookworm.
# Digest-pinned for supply-chain integrity; refresh deliberately via Dependabot.
FROM debian:trixie-slim@sha256:28de0877c2189802884ccd20f15ee41c203573bd87bb6b883f5f46362d24c5c2
WORKDIR /app
# Provided by BuildKit/buildx when building multi-platform images.
ARG TARGETARCH
# Optional suffix to select a different prebuilt binary (e.g., "-mongo").
# Default: empty, which keeps current behavior.
ARG BINARY_SUFFIX=""
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
COPY target/release/rust_oauth2_server${BINARY_SUFFIX}-${TARGETARCH} /app/rust_oauth2_server
RUN chmod +x /app/rust_oauth2_server
COPY templates ./templates
COPY static ./static
RUN mkdir -p /app/data
EXPOSE 8080
ENV OAUTH2_SERVER_HOST=0.0.0.0
ENV OAUTH2_SERVER_PORT=8080
ENV OAUTH2_DATABASE_URL=sqlite:/app/data/oauth2.db
ENV RUST_LOG=info
CMD ["/app/rust_oauth2_server"]