2022-03-11 15:05:55 +01:00
|
|
|
#
|
|
|
|
|
# This file was created by generate_dockerfiles.py.
|
2025-05-28 16:29:09 +02:00
|
|
|
# Usage: podman build --shm-size=1g -f ./Dockerfile.test_precommit ../../
|
2022-03-11 15:05:55 +01:00
|
|
|
#
|
|
|
|
|
|
2024-05-01 16:09:41 +02:00
|
|
|
FROM ubuntu:24.04
|
2022-03-11 15:05:55 +01:00
|
|
|
|
|
|
|
|
# Install dependencies.
|
|
|
|
|
WORKDIR /opt/cp2k-precommit
|
|
|
|
|
COPY ./tools/precommit/ /opt/cp2k-precommit/
|
|
|
|
|
RUN ./install_requirements.sh
|
2025-03-01 11:14:49 +01:00
|
|
|
ENV PATH="/opt/venv/bin:/opt/cp2k-precommit:$PATH"
|
2022-03-11 15:05:55 +01:00
|
|
|
|
|
|
|
|
# Install sources.
|
|
|
|
|
WORKDIR /opt/cp2k
|
|
|
|
|
COPY ./ ./
|
|
|
|
|
|
|
|
|
|
# Run precommit test.
|
|
|
|
|
RUN ./tools/docker/scripts/test_precommit.sh 2>&1 | tee report.log
|
|
|
|
|
|
|
|
|
|
# Output the report if the image is old and was therefore pulled from the build cache.
|
|
|
|
|
CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/'
|
2022-05-24 00:41:10 +02:00
|
|
|
ENTRYPOINT []
|
2022-03-11 15:05:55 +01:00
|
|
|
|
|
|
|
|
#EOF
|