mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
a916f4da1f
* add fuzzer and common * fixes * use tmpdir * add fuzzer * add dockerfile * uv stuff * namespace fuzzer * keep distutils for now * use container python for now * pass through flags * add build bot image * add redis * add namespace prefix * more prefixes * start build bot * add fuzzer bot * oof this got complicated * fix author
41 lines
1.2 KiB
Docker
41 lines
1.2 KiB
Docker
|
|
|
|
ARG BASE_IMAGE=gcr.io/oss-fuzz-base/base-runner
|
|
|
|
FROM $BASE_IMAGE AS runner-base
|
|
RUN apt-get update
|
|
# TODO(Ian): maybe we should have a different base image for the builder
|
|
RUN curl -fsSL https://get.docker.com | sh
|
|
|
|
FROM $BASE_IMAGE AS builder
|
|
|
|
COPY --from=ghcr.io/astral-sh/uv:0.5.20 /uv /uvx /bin/
|
|
|
|
ENV UV_LINK_MODE=copy
|
|
ENV UV_COMPILE_BYTECODE=1
|
|
ENV UV_PYTHON_DOWNLOADS=never
|
|
ENV UV_PYTHON=/usr/local/bin/python3.10
|
|
|
|
WORKDIR /fuzzer
|
|
|
|
# Install dependencies
|
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
--mount=type=bind,source=common/uv.lock,target=/common/uv.lock \
|
|
--mount=type=bind,source=common/pyproject.toml,target=/common/pyproject.toml \
|
|
--mount=type=bind,source=common/README.md,target=/common/README.md \
|
|
--mount=type=bind,source=fuzzer/uv.lock,target=/fuzzer/uv.lock \
|
|
--mount=type=bind,source=fuzzer/pyproject.toml,target=/fuzzer/pyproject.toml \
|
|
cd /fuzzer && uv sync --frozen --no-install-project --no-editable
|
|
|
|
ADD ./common /common
|
|
ADD ./fuzzer /fuzzer
|
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
uv sync --frozen --no-editable
|
|
|
|
FROM runner-base AS runtime
|
|
|
|
COPY --from=builder --chown=app:app /fuzzer/.venv /fuzzer/.venv
|
|
|
|
ENTRYPOINT ["/fuzzer/.venv/bin/python"] |