Artifact
394760ed32c43d846211722215b9c1886186e396b87d24842e278505d2e3aa7b :
File
tinyproxy/Dockerfile
— part of check-in
[48dd98c374]
at
2024-10-18 22:55:15
on branch trunk
— Initial version of the tinyproxy container builder
(user:
tangent
size: 763)
0000: 23 20 73 79 6e 74 61 78 3d 64 6f 63 6b 65 72 2f # syntax=docker/
0010: 64 6f 63 6b 65 72 66 69 6c 65 3a 31 2e 30 0a 0a dockerfile:1.0..
0020: 23 23 20 53 54 41 47 45 20 31 3a 20 42 75 69 6c ## STAGE 1: Buil
0030: 64 20 74 68 65 20 73 74 61 74 69 63 20 62 69 6e d the static bin
0040: 61 72 79 0a 46 52 4f 4d 20 61 6c 70 69 6e 65 3a ary.FROM alpine:
0050: 65 64 67 65 20 41 53 20 62 75 69 6c 64 0a 41 52 edge AS build.AR
0060: 47 20 56 45 52 53 49 4f 4e 3d 6d 61 73 74 65 72 G VERSION=master
0070: 0a 52 55 4e 20 61 70 6b 20 61 64 64 20 2d 2d 6e .RUN apk add --n
0080: 6f 2d 63 61 63 68 65 20 61 75 74 6f 63 6f 6e 66 o-cache autoconf
0090: 20 61 75 74 6f 6d 61 6b 65 20 62 75 69 6c 64 2d automake build-
00a0: 62 61 73 65 20 67 69 74 0a 52 55 4e 20 67 69 74 base git.RUN git
00b0: 20 63 6c 6f 6e 65 20 2d 2d 64 65 70 74 68 20 31 clone --depth 1
00c0: 20 2d 2d 62 72 61 6e 63 68 20 24 7b 56 45 52 53 --branch ${VERS
00d0: 49 4f 4e 7d 20 68 74 74 70 73 3a 2f 2f 67 69 74 ION} https://git
00e0: 68 75 62 2e 63 6f 6d 2f 74 69 6e 79 70 72 6f 78 hub.com/tinyprox
00f0: 79 2f 74 69 6e 79 70 72 6f 78 79 0a 52 55 4e 20 y/tinyproxy.RUN
0100: 73 65 74 20 2d 78 20 5c 0a 20 20 20 20 26 26 20 set -x \. &&
0110: 63 64 20 74 69 6e 79 70 72 6f 78 79 20 5c 0a 20 cd tinyproxy \.
0120: 20 20 20 26 26 20 2e 2f 61 75 74 6f 67 65 6e 2e && ./autogen.
0130: 73 68 20 5c 0a 20 20 20 20 26 26 20 2e 2f 63 6f sh \. && ./co
0140: 6e 66 69 67 75 72 65 20 43 46 4c 41 47 53 3d 22 nfigure CFLAGS="
0150: 2d 4f 73 20 2d 73 20 2d 73 74 61 74 69 63 22 20 -Os -s -static"
0160: 5c 0a 20 20 20 20 20 20 20 20 2d 2d 64 69 73 61 \. --disa
0170: 62 6c 65 2d 6d 61 6e 70 61 67 65 5f 73 75 70 70 ble-manpage_supp
0180: 6f 72 74 20 5c 0a 20 20 20 20 20 20 20 20 2d 2d ort \. --
0190: 64 69 73 61 62 6c 65 2d 74 72 61 6e 73 70 61 72 disable-transpar
01a0: 65 6e 74 20 5c 0a 20 20 20 20 20 20 20 20 2d 2d ent \. --
01b0: 64 69 73 61 62 6c 65 2d 78 74 69 6e 79 70 72 6f disable-xtinypro
01c0: 78 79 20 5c 0a 20 20 20 20 20 20 20 20 2d 2d 70 xy \. --p
01d0: 72 65 66 69 78 3d 2f 20 5c 0a 20 20 20 20 26 26 refix=/ \. &&
01e0: 20 6d 61 6b 65 20 2d 6a 31 32 0a 52 55 4e 20 6d make -j12.RUN m
01f0: 6b 64 69 72 20 2f 65 6d 70 74 79 0a 0a 23 23 20 kdir /empty..##
0200: 53 54 41 47 45 20 32 3a 20 42 75 69 6c 64 20 74 STAGE 2: Build t
0210: 68 65 20 63 6f 6e 74 61 69 6e 65 72 20 70 72 6f he container pro
0220: 70 65 72 0a 46 52 4f 4d 20 73 63 72 61 74 63 68 per.FROM scratch
0230: 20 41 53 20 72 75 6e 0a 43 4f 50 59 20 2d 2d 66 AS run.COPY --f
0240: 72 6f 6d 3d 62 75 69 6c 64 20 2f 74 69 6e 79 70 rom=build /tinyp
0250: 72 6f 78 79 2f 73 72 63 2f 74 69 6e 79 70 72 6f roxy/src/tinypro
0260: 78 79 20 2f 62 69 6e 2f 0a 43 4f 50 59 20 2d 2d xy /bin/.COPY --
0270: 66 72 6f 6d 3d 62 75 69 6c 64 20 2f 65 6d 70 74 from=build /empt
0280: 79 2f 20 2f 65 74 63 2f 0a 0a 23 20 53 74 61 72 y/ /etc/..# Star
0290: 74 20 69 74 20 61 73 20 61 20 73 65 72 76 65 72 t it as a server
02a0: 2e 0a 45 58 50 4f 53 45 20 38 38 38 38 2f 74 63 ..EXPOSE 8888/tc
02b0: 70 0a 45 4e 54 52 59 50 4f 49 4e 54 20 5b 20 22 p.ENTRYPOINT [ "
02c0: 2f 62 69 6e 2f 74 69 6e 79 70 72 6f 78 79 22 2c /bin/tinyproxy",
02d0: 20 22 2d 64 22 2c 20 5c 0a 20 20 20 20 22 2d 63 "-d", \. "-c
02e0: 22 2c 20 22 2f 65 74 63 2f 74 69 6e 79 70 72 6f ", "/etc/tinypro
02f0: 78 79 2e 63 6f 6e 66 22 20 5d 0a xy.conf" ].