Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile broken with ARTIFACT_BASE=sagemath/sagemath-dev:develop #39596

Open
2 tasks done
rrueger opened this issue Feb 27, 2025 · 0 comments
Open
2 tasks done

Dockerfile broken with ARTIFACT_BASE=sagemath/sagemath-dev:develop #39596

rrueger opened this issue Feb 27, 2025 · 0 comments

Comments

@rrueger
Copy link
Contributor

rrueger commented Feb 27, 2025

Environment

  • OS: Archlinux / 6.12.16-1-lts
  • Sage Version: Commit 9cd86e95 (git log -1 --format=%H | head -c8)

Steps To Reproduce

On the one hand, the Dockerfile itself suggests to speed up build times by basing on e.g. sagemath/sagemath-dev:develop

sage/docker/Dockerfile

Lines 34 to 35 in 9cd86e9

# To build Sage, run this command from your sage/ directory: #
# $ docker build --build-arg MAKEFLAGS="-j4" --build-arg SAGE_NUM_THREADS="4" --build-arg ARTIFACT_BASE="sagemath/sagemath-dev:develop" -f docker/Dockerfile --target=make-build --tag sage .

On the other hand, the Dockerfile also says

sage/docker/Dockerfile

Lines 134 to 136 in 9cd86e9

# Warning: If you set ARTIFACT_BASE to something else than source-clean, the #
# build is not going to use the build-time-dependencies target but rely on #
# whatever tools are installed in ARTIFACT_BASE. #

and a few lines lower

sage/docker/Dockerfile

Lines 154 to 159 in 9cd86e9

ARG SAGE_ROOT=/home/sage/sage
WORKDIR $SAGE_ROOT
# We create a list of all files present in the artifact-base (with a timestamp
# of now) so we can find out later which files were added/changed/removed.
RUN find . \( -type f -or -type l \) > $HOME/artifact-base.manifest
RUN git fetch --update-shallow "$HOME/sage-context" HEAD \

assumes that /home/sage/sage is a git repository.

This doesn't appear to be the case for any of the sagemath/sagemath*:* images

# docker run sagemath/sagemath-dev:develop git -C /home/sage/sage/.git status
fatal: cannot change to '/home/sage/sage/.git': No such file or directory

As a result, this kind of build fails. For now I will build from source-clean.

Config log

n/a

Package logs

n/a

Additional Information

No response

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant