-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 861 Bytes
/
Dockerfile
File metadata and controls
34 lines (23 loc) · 861 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
# Based off https://github.com/tinyproxy/tinyproxy/issues/501#issuecomment-2256073227
FROM debian:trixie-slim AS build-stage
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update \
&& apt --yes upgrade \
&& apt --yes install git build-essential automake
RUN adduser --shell /bin/false builder
USER builder
WORKDIR /home/builder
RUN git clone --depth 1 https://github.com/tinyproxy/tinyproxy.git --branch 1.11.2 tinyproxy \
&& cd /home/builder/tinyproxy \
&& ./autogen.sh \
&& LDFLAGS=-static ./configure \
--prefix= \
--disable-xtinyproxy \
--disable-reverse \
--disable-manpage_support \
&& make
FROM scratch AS run-stage
COPY --from=build-stage --chown=0 /home/builder/tinyproxy/src/tinyproxy /usr/local/bin/tinyproxy
USER 1000
EXPOSE 3128
CMD ["/usr/local/bin/tinyproxy", "-d", "-c", "/tinyproxy.conf"]