-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile.proxy
More file actions
37 lines (25 loc) · 963 Bytes
/
Dockerfile.proxy
File metadata and controls
37 lines (25 loc) · 963 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
# Build stage
FROM golang:1.26.1-bookworm AS builder
ARG EXTRA_BUILD_ARGS
ARG FIPS_MODE
RUN apt update -y
RUN apt install -y build-essential ca-certificates python3 git
WORKDIR /code
COPY . .
RUN bash -c 'if [[ "${FIPS_MODE}" = "enabled" ]]; \
then echo "building in fips mode"; make clean split-proxy-fips entrypoints EXTRA_BUILD_ARGS="${EXTRA_BUILD_ARGS}"; mv split-proxy-fips split-proxy; \
else echo "building in standard mode"; make clean split-proxy entrypoints EXTRA_BUILD_ARGS="${EXTRA_BUILD_ARGS}"; \
fi'
# Runner stage
FROM debian:13.3 AS runner
RUN apt update -y
RUN apt upgrade -y
RUN apt install -y bash ca-certificates
RUN groupadd -g 1000 split-proxy
RUN useradd -r -u 1000 -g split-proxy -s /usr/sbin/nologin split-proxy
COPY docker/functions.sh .
COPY --from=builder /code/split-proxy /usr/bin/
COPY --from=builder /code/entrypoint.proxy.sh .
EXPOSE 3000 3010
USER 'split-proxy'
ENTRYPOINT ["bash", "entrypoint.proxy.sh"]