mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3644] [CLOSED] [Other] root Dockerfile: pass the source commit to the terminal stage (source build fails at v0.2.2) #4731
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4731
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3644
Author: @robertoetcheverryr
Created: 10/21/2026
Status: ❌ Closed
Base:
main← Head:FixContainer📝 Commits (2)
64f5696Update Dockerfilefb957cbUpdate DOCKER.md📊 Changes
2 files changed (+10 additions, -7 deletions)
View changed files
📝
Dockerfile(+2 -0)📝
docs/DOCKER.md(+8 -7)📄 Description
Problem and result
At v0.2.2 (
011c9e6) the documented source build (docker build -t strata:src ., "From source" in docs/DOCKER.md) fails in the terminal stage:.dockerignoreexcludes.git, and the root Dockerfile's terminal stage takes no commit argument, sopackage_terminal.pyhas nothing to read. After this change the documented commands pass the commit, the build goes through, and the archive carries its COMMIT file.Related discussion
Same failure reported in a comment on #3503 (closed) and worked around locally in #3624 ("reported separately"). Build and docs fix only, no behavior or default change.
Approach
docker/Dockerfilealready uses,ARG STRATA_COMMIT→ENV STRATA_BUILD_COMMIT, whichbuild_commit()already reads. Two lines in the terminal stage.--build-arg STRATA_COMMIT=$(git rev-parse HEAD), with one sentence on why.Without the arg the value is empty,
build_commit()rejects it and the build stops with the same message as before.Validation
Passed:
sudo docker compose build --build-arg STRATA_COMMIT=$(sudo git -C app rev-parse HEAD)(compose build context = repo clone, argsCUDA_ARCHITECTURES: "86"), v0.2.2011c9e6plus this change, Debian 13, Docker 29.9.2 (a82e528), RTX 3090: image built in 1056.1 s, terminal stagestrata --versionpassed. COMMIT file carried into the image:Failed:
[terminal 4/5]with the message above.Not run:
docker/Dockerfile/docker/build.sh: not touched.docker build -t strata:src ...): built through docker compose with the same build arg instead.Limits
A bare
docker build .without the arg still stops, as the packager intends (it refuses an archive with no commit). Making it work with no arg would mean either keeping.gitin the build context or letting the packager warn instead of fail. I left both out because they change existing behavior; happy to do either if preferred.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.