2024-05-26 02:00:56 +02:00
|
|
|
FROM alpine:3.20.0
|
2023-07-06 09:29:32 +02:00
|
|
|
|
2023-07-12 10:55:59 +02:00
|
|
|
# Set labels manually, each build service differs in used or predefined labels.
|
2023-07-06 09:29:32 +02:00
|
|
|
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"
|
|
|
|
|
2023-07-12 10:55:59 +02:00
|
|
|
# Use a individual user and group ip for files and process
|
2023-07-06 09:29:32 +02:00
|
|
|
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"
|
2023-07-12 10:55:59 +02:00
|
|
|
ENV FILTER_FILE "/app/filter"
|
2023-07-06 09:29:32 +02:00
|
|
|
|
2023-10-09 16:00:04 +02:00
|
|
|
ENV TZ "Europe/Berlin"
|
2023-07-12 10:55:59 +02:00
|
|
|
|
|
|
|
# get existing packages
|
|
|
|
# curl for healthchecks and debugging
|
2023-07-06 09:29:32 +02:00
|
|
|
RUN apk add --no-cache \
|
2023-10-09 16:00:04 +02:00
|
|
|
tinyproxy curl tzdata
|
2023-07-06 09:29:32 +02:00
|
|
|
|
2023-07-12 10:55:59 +02:00
|
|
|
COPY entrypoint.sh /app/entrypoint.sh
|
2023-07-06 09:29:32 +02:00
|
|
|
|
2023-07-12 10:55:59 +02:00
|
|
|
RUN touch /app/proxy.conf && \
|
|
|
|
chmod +x /app/entrypoint.sh && \
|
|
|
|
chown -R ${TINYPROXY_UID}:${TINYPROXY_GID} /app /etc/tinyproxy /var/log/tinyproxy
|
2023-07-11 10:32:44 +02:00
|
|
|
|
2023-07-06 09:29:32 +02:00
|
|
|
USER ${TINYPROXY_UID}:${TINYPROXY_GID}
|
2023-07-12 10:55:59 +02:00
|
|
|
WORKDIR /app
|
2023-07-06 09:29:32 +02:00
|
|
|
|
|
|
|
EXPOSE 8888
|
|
|
|
|
2023-07-12 10:55:59 +02:00
|
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
|
|
CMD ["-c", "/app/proxy.conf", "-d"]
|