2022-09-22 08:13:38 +00:00
|
|
|
FROM docker.io/library/golang:1.19-alpine3.16 as builder
|
|
|
|
|
|
|
|
# hadolint ignore=DL3018
|
|
|
|
RUN apk add --no-cache build-base && \
|
|
|
|
go install -ldflags "-s -w" -trimpath git.worn.eu/guru/squid-rewriter@latest
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
FROM docker.io/library/alpine:3.16
|
2022-08-20 22:06:29 +00:00
|
|
|
|
2022-08-20 23:27:15 +00:00
|
|
|
# hadolint ignore=DL3018
|
2022-08-20 22:06:29 +00:00
|
|
|
RUN apk add --no-cache squid openssl darkhttpd
|
2022-09-22 08:13:38 +00:00
|
|
|
COPY run.sh /
|
2022-08-21 16:29:20 +00:00
|
|
|
COPY install-ca.sh /static/
|
2022-09-22 08:13:38 +00:00
|
|
|
COPY squid.conf rewrites.yaml /etc/squid/
|
|
|
|
COPY --from=builder /go/bin/squid-rewriter /usr/local/bin/
|
|
|
|
RUN chmod 0755 /run.sh /usr/local/bin/squid-rewriter ; mkdir /ca
|
2022-08-20 22:06:29 +00:00
|
|
|
|
|
|
|
VOLUME /var/cache/squid
|
|
|
|
EXPOSE 3128
|
|
|
|
|
|
|
|
CMD ["/run.sh"]
|