AgPerry's picture
Add files using upload-large-folder tool
35fc7ae verified
Raw History Blame Contribute Delete
1.62 kB
FROM python:3.12.11-slim-bookworm@sha256:519591d6871b7bc437060736b9f7456b8731f1499a57e22e6c285135ae657bf7
WORKDIR /srv/reference
# BEGIN WebsiteBench runtime dependencies
COPY --from=ghcr.io/astral-sh/uv:0.12.8@sha256:d1cbaeadc234fe19c0d93daabcf5e98738cd93c6d1dd4918ef6aa30735feb23a /uv /usr/local/bin/uv
COPY vendor.requirements.lock vendor.requirements.lock
RUN uv pip install --python /usr/local/bin/python --no-cache --no-deps --require-hashes --only-binary :all: --link-mode copy --target vendor -r vendor.requirements.lock && rm -f vendor/.lock
# END WebsiteBench runtime dependencies
COPY . .
ENV HOST=0.0.0.0 PORT=8080 DATA_DIR=/tmp/websitebench-crunchyroll-reference-data SEED=0 TZ=UTC
RUN ./compile.sh
HEALTHCHECK --interval=2s --timeout=3s --retries=30 CMD python3 -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/healthz', timeout=2)"
CMD ["./executable"]
# Added by the WebsiteBench Harbor materializer. The original app runs only on loopback; the Agent-facing reference is trusted HTTPS.
COPY .websitebench-reference-tls/ /opt/websitebench/reference-tls/
RUN chmod 600 /opt/websitebench/reference-tls/reference.key && chmod 755 /opt/websitebench/reference-tls/tls_proxy.py
ENV WEBSITEBENCH_REFERENCE_UPSTREAM_PORT=18080
HEALTHCHECK --interval=2s --timeout=3s --retries=30 CMD python3 -c "import os,ssl,urllib.request as r;c=ssl.create_default_context(cafile='/opt/websitebench/reference-tls/ca.crt');u='https://127.0.0.1:'+os.environ.get('PORT','8080')+'/healthz';r.urlopen(u,context=c,timeout=2).close()"
CMD ["python3", "/opt/websitebench/reference-tls/tls_proxy.py", "./run.sh"]