2023-07-06 09:29:32 +02:00
|
|
|
FROM alpine:3.18.2
|
|
|
|
|
|
|
|
#LABEL build_version=""
|
|
|
|
LABEL maintainer="OCram85"
|
|
|
|
ARG VERSION
|
|
|
|
LABEL build_version="${VERSION}"
|
|
|
|
LABEL org.opencontainers.image.authors="OCram85"
|
|
|
|
LABEL org.opencontainers.image.vendor="OCram85"
|
|
|
|
|
|
|
|
LABEL org.opencontainers.image.title="swarmproxy"
|
|
|
|
LABEL org.opencontainers.image.description="tinyproxy docker image"
|
|
|
|
LABEL org.opencontainers.image.licenses="AGPL-3.0"
|
|
|
|
ARG TAG
|
|
|
|
LABEL org.opencontainers.image.version="${TAG}"
|
|
|
|
|
|
|
|
LABEL org.opencontainers.image.url="https://gitea.ocram85.com/OCram85/swarmproxy"
|
|
|
|
LABEL org.opencontainers.image.source="https://gitea.ocram85.com/OCram85/swarmproxy.git"
|
|
|
|
LABEL org.opencontainers.image.documentation="https://gitea.ocram85.com/OCram85/swarmproxy"
|
|
|
|
|
|
|
|
# Use a custom UID/GID instead of the default system UID which has a greater possibility
|
|
|
|
# for collisions with the host and other containers.
|
|
|
|
ENV TINYPROXY_UID 5123
|
|
|
|
ENV TINYPROXY_GID 5123
|
|
|
|
|
|
|
|
ENV UPSTREAM_PROXY ""
|
2023-07-11 10:32:44 +02:00
|
|
|
ENV UPSTREAM_PROXY_FILE ""
|
2023-07-06 09:29:32 +02:00
|
|
|
ENV PORT "8888"
|
|
|
|
ENV TIMEOUT "600"
|
|
|
|
ENV LOGLEVEL "Info"
|
|
|
|
ENV MAXCLIENTS "600"
|
|
|
|
ENV FILTER_FILE "/etc/tinyproxy/filter"
|
|
|
|
|
|
|
|
# Curl is for healthchecks.
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
tinyproxy curl
|
|
|
|
|
2023-07-12 07:53:09 +02:00
|
|
|
RUN mv /etc/tinyproxy/tinyproxy.conf /etc/tinyproxy/tinyproxy.default.conf && \
|
|
|
|
touch /etc/tinyproxy/tinyproxy.conf
|
2023-07-06 09:29:32 +02:00
|
|
|
|
2023-07-12 07:53:09 +02:00
|
|
|
WORKDIR /swarmproxy
|
|
|
|
COPY entrypoint.sh entrypoint.sh
|
2023-07-11 10:32:44 +02:00
|
|
|
|
2023-07-06 09:29:32 +02:00
|
|
|
RUN chown -R ${TINYPROXY_UID}:${TINYPROXY_GID} /etc/tinyproxy /var/log/tinyproxy
|
2023-07-12 07:53:09 +02:00
|
|
|
|
2023-07-06 09:29:32 +02:00
|
|
|
USER ${TINYPROXY_UID}:${TINYPROXY_GID}
|
|
|
|
|
|
|
|
EXPOSE 8888
|
|
|
|
|
2023-07-12 07:53:09 +02:00
|
|
|
ENTRYPOINT ["/swarmproxy/entrypoint.sh"]
|
|
|
|
CMD ["/usr/bin/tinyproxy", "-d"]
|