Files
trailofbits-buttercup/program-model/Dockerfile
T
2over12 ea2fd093d5 Program model integrate (#13)
* Add documentation

* Add janusgraph custom configuration. Simply graph creation.

* Add properties to edges. Index on uri property.

* reformat

* Create libpng graph in a more reasonable amount of time.

* Update README.md

* Wrap indexing into function

* updating...

* update proto

* fix command

* Update settings for serve and processing indexing

* Add dockerfile to docker container

* Add trigger script

* Fix error with loading graphml file

* reformat

* Remove resource constraints for program model

* Change permissions of temp dir

* Update readme

* Update dockerignore

---------

Co-authored-by: Evan Downing <2077950+evandowning@users.noreply.github.com>
2025-02-18 11:59:16 -05:00

42 lines
1.5 KiB
Docker

ARG BASE_IMAGE=ubuntu:20.04@sha256:4a45212e9518f35983a976eead0de5eecc555a2f047134e9dd2cfc589076a00d
FROM $BASE_IMAGE AS base
RUN apt-get update && apt-get install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update && apt-get install -y python3.10 curl
RUN curl -fsSL https://get.docker.com | sh
FROM base AS builder
COPY --from=ghcr.io/astral-sh/uv:0.5.20 /uv /uvx /bin/
ENV UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1 \
UV_PYTHON_DOWNLOADS=never \
UV_PYTHON=python3.10
WORKDIR /program-model
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=program-model/uv.lock,target=/program-model/uv.lock \
--mount=type=bind,source=program-model/pyproject.toml,target=/program-model/pyproject.toml \
--mount=type=bind,source=program-model/README.md,target=/program-model/README.md \
cd /program-model && uv sync --frozen --no-install-project --no-editable
COPY ./common /common
COPY ./program-model /program-model
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-editable
FROM base AS runtime
WORKDIR /program-model
COPY ./program-model/scripts /program-model/scripts
COPY --from=builder --chown=app:app /program-model/.venv /program-model/.venv
ENV PATH=/program-model/.venv/bin:$PATH