From 85fc5e365230c28ece6ecd8403a3f426a68db2f8 Mon Sep 17 00:00:00 2001 From: thomasms Date: Fri, 12 Sep 2025 17:13:01 +0200 Subject: Improve docker build time --- .nea/.gitlab-ci.yml | 5 ++++- .nea/docker/Dockerfile.slim | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to '.nea') diff --git a/.nea/.gitlab-ci.yml b/.nea/.gitlab-ci.yml index 45b1787..cb72907 100644 --- a/.nea/.gitlab-ci.yml +++ b/.nea/.gitlab-ci.yml @@ -210,5 +210,8 @@ docker_ubuntu24_slim: /kaniko/executor --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/.nea/docker/Dockerfile.slim" - --destination "${DOCKER_BASE_REPO}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}:v5.1.0-slim" + --destination "${DOCKER_BASE_REPO}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}:${CI_COMMIT_TAG}-slim" --single-snapshot --cache=false + rules: + - if: '$CI_COMMIT_TAG =~ /v+\d+\.\d+\.\d+/' + diff --git a/.nea/docker/Dockerfile.slim b/.nea/docker/Dockerfile.slim index ebfae15..251dfb5 100644 --- a/.nea/docker/Dockerfile.slim +++ b/.nea/docker/Dockerfile.slim @@ -32,13 +32,14 @@ RUN AG="env DEBIAN_FRONTEND=noninteractive apt-get -yq" && \ rm -rf .git Donjon/data Dragon/data Trivac/data doc && \ cd ${DRAGON_CODE_DIR}/Donjon && \ make hdf5=1 openmp=1 && \ - # this doesn't remove the binaries, just the *.o and the *.a and *.mod files - make clean && \ cd ../PyGan && \ make hdf5=1 openmp=1 && \ # this doesn't remove the binaries, just the *.o and the *.a and *.mod files make clean && \ - cd ../Ganlib && \ + cd ${DRAGON_CODE_DIR}/Donjon && \ + # this doesn't remove the binaries, just the *.o and the *.a and *.mod files + make clean && \ + cd ${DRAGON_CODE_DIR}/Ganlib && \ ./rganlib -q testgan1.x2m && \ ./rganlib -q testgan2.x2m && \ ./rganlib -q testgan3.x2m && \ -- cgit v1.2.3