Docker-Swarm-Loadbalancer/mitm-proxy/Dockerfile

44 lines
1.5 KiB
Text
Raw Normal View History

Trunk linter (#17) * linting is fun * mis-detection of missing healthcheck staements. * typo * disable tagging vanity tags on non-main branch * Unbugger node build? * Add gitleaks detector, remove an expired secret. * More linting-derived cleanup * Fiddle with trivy * Fiddle with trivy * add a readme * Fix build bug with php flavours * Marshall should build other flavours of ubuntu. * Fiddle with act cache location. * Add concurrency checks * Composer version gubbins for 7.0/7.1 * ubuntu is just a label, and injected over the top of. * Composer version gubbins for 7.0/7.1 * Run when workflow is altered too please. * Hopefully fix composer stage. * setup tooling meta-tooling. * Add trunk * Disable mirror mode, its being problematic, and increase retries to 5. * Revisit how ghcr login works. * Add trunk checks. * All hail the linter * Heavilly revise workflow * Fettling * Fettling * Fettling * Fettling * Fettling * Cleanup * Cleanup * Fettling.. Why does mitm build but not redis? * Fettling.. Why does mitm build but not redis? * Debuggin * Fettling. * Fix build? * Permissions are a pain * Switch around some should_push logic because envs aren't available that early. * Permissionssssss * Trivy, bane of my life * Fix merge? * Fix labels * Help node along, among other things * Redis 6.1 & 7.1 aren't a thing any more. * Ffff USER nonsense * latest-openssl doesn't exist. * fixup mysqlproxy. * Fix labels * uurrgh * uurrgh * Didn't need to add the mitmproxy user, it exists * Missing ghcr login * Missing backtick * Fix build? * Add validate build step to bouncer. * Fix bouncer build * Disable laravel build * Missing env * Fix swarm mon build * Scout just doesn't seem to work.
2024-02-07 15:21:14 +00:00
FROM mitmproxy:version
2024-01-28 08:20:45 +00:00
ARG BUILD_DATE
ARG GIT_SHA
ARG MITM_VERSION
2024-01-28 06:11:04 +00:00
LABEL maintainer="Matthew Baggett <matthew@baggett.me>" \
2024-01-28 08:20:45 +00:00
org.opencontainers.image.source="https://github.com/benzine-framework/docker/mitm-proxy" \
org.opencontainers.image.title="mitm-proxy with healthcheck" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.version="${MITM_VERSION}" \
org.opencontainers.image.revision="${GIT_SHA}" \
org.opencontainers.image.vendor="Benzine" \
org.opencontainers.image.authors="Matthew Baggett <matthew@baggett.me>"
2024-01-28 06:11:04 +00:00
# Install curl
# hadolint ignore=DL3018,DL4006
RUN os=$(grep "^ID=" < /etc/os-release | cut -f2 -d'=') && \
echo "OS: $os" && \
if [ "$os" = "debian" ] || [ "$os" = "ubuntu" ]; then \
apt-get update -yqq && \
apt-get install -yqq --no-install-recommends \
curl \
bash \
&& \
apt-get clean && \
apt-get autoclean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/lib/dpkg/status.old /var/cache/debconf/templates.dat /var/log/dpkg.log /var/log/lastlog /var/log/apt/*.log; \
elif [ "$os" = "alpine" ]; then \
apk add \
--update \
--no-cache \
curl \
bash \
; \
else \
echo "Unknown OS: $os"; \
exit 1; \
fi
Trunk linter (#17) * linting is fun * mis-detection of missing healthcheck staements. * typo * disable tagging vanity tags on non-main branch * Unbugger node build? * Add gitleaks detector, remove an expired secret. * More linting-derived cleanup * Fiddle with trivy * Fiddle with trivy * add a readme * Fix build bug with php flavours * Marshall should build other flavours of ubuntu. * Fiddle with act cache location. * Add concurrency checks * Composer version gubbins for 7.0/7.1 * ubuntu is just a label, and injected over the top of. * Composer version gubbins for 7.0/7.1 * Run when workflow is altered too please. * Hopefully fix composer stage. * setup tooling meta-tooling. * Add trunk * Disable mirror mode, its being problematic, and increase retries to 5. * Revisit how ghcr login works. * Add trunk checks. * All hail the linter * Heavilly revise workflow * Fettling * Fettling * Fettling * Fettling * Fettling * Cleanup * Cleanup * Fettling.. Why does mitm build but not redis? * Fettling.. Why does mitm build but not redis? * Debuggin * Fettling. * Fix build? * Permissions are a pain * Switch around some should_push logic because envs aren't available that early. * Permissionssssss * Trivy, bane of my life * Fix merge? * Fix labels * Help node along, among other things * Redis 6.1 & 7.1 aren't a thing any more. * Ffff USER nonsense * latest-openssl doesn't exist. * fixup mysqlproxy. * Fix labels * uurrgh * uurrgh * Didn't need to add the mitmproxy user, it exists * Missing ghcr login * Missing backtick * Fix build? * Add validate build step to bouncer. * Fix bouncer build * Disable laravel build * Missing env * Fix swarm mon build * Scout just doesn't seem to work.
2024-02-07 15:21:14 +00:00
USER mitmproxy
2024-01-28 06:11:04 +00:00
# Add healthcheck
2024-01-28 08:20:45 +00:00
HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -I -x http://localhost:8080 -k https://www.google.com || exit 1