tig-monorepo/Dockerfile.runtime
FiveMovesAhead 89d86f9deb
Some checks are pending
Test Workspace / Test Workspace (push) Waiting to run
Rework architecture so each challenge has separate runtime & docker.
2025-06-04 11:06:26 +01:00

29 lines
899 B
Docker

ARG BASE_IMAGE=ubuntu:24.04
ARG CHALLENGE
FROM ghcr.io/tig-foundation/tig-monorepo/${CHALLENGE}/dev AS dev
FROM ${BASE_IMAGE}
ARG CHALLENGE
ENV CHALLENGE=${CHALLENGE}
RUN if [ -z "$CHALLENGE" ]; then echo "Error: '--build-arg CHALLENGE' must be set." && exit 1; fi
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y python3 python3-pip
RUN pip3 install requests --break-system-packages
COPY scripts/ /usr/local/bin/tig-scripts/
RUN chmod +x /usr/local/bin/tig-scripts/*
ENV PATH="/usr/local/bin/tig-scripts:${PATH}"
COPY --from=dev /usr/local/bin/tig-runtime /usr/local/bin/tig-runtime
COPY --from=dev /usr/local/bin/tig-verifier /usr/local/bin/tig-verifier
COPY --from=dev /usr/local/lib/rust /usr/local/lib/rust
RUN chmod +x /usr/local/bin/tig-runtime && \
chmod +x /usr/local/bin/tig-verifier
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/rust"
WORKDIR /app