Optimized Docker build script for faster rebuilds#16
Merged
Xeeynamo merged 2 commits intoXeeynamo:mainfrom Jan 6, 2026
Merged
Conversation
Xeeynamo
reviewed
Dec 29, 2025
Comment on lines
11
to
19
| exec docker run --rm --platform=linux/amd64 \ | ||
| -v "$(pwd)":/ff7 \ | ||
| -v ff7_venv:/ff7/.venv \ | ||
| -v "$(pwd)/build":/ff7/build \ | ||
| -v "$HOME/.cache/ff7-go-mod":/gocache/mod \ | ||
| -v "$HOME/.cache/ff7-go-build":/gocache/build \ | ||
| -e "GOMODCACHE=/gocache/mod" \ | ||
| -e "GOCACHE=/gocache/build" \ | ||
| ff7-build:latest -lc "cd /ff7 && $*" |
Owner
There was a problem hiding this comment.
./Dockerfile
# 2. launch container and mount current directory under /ff7
# docker run --name ff7-work -it -v $(pwd):/ff7 -v ff7_venv:/ff7/.venv -v ff7_build:/ff7/build ff7-build
Let's integrate these flags from the original Dockerfile instructions:
--name ff7-work: useful fordocker start -ai ff7-work-v ff7_build:/ff7/build: useful to produce the binaries on the host
In addition I suggest to:
-v go_cache:/gocache: instead of mounting~/.cacheto avoid writing files on the host. For Docker on macOS, it's faster to have large cache volumes within the Docker VM than mapped from the host. This also allows to removemkdir -p ~/.cache/ff7-go-mod ~/.cache/ff7-go-build.-e "GOMODCACHE=/gocache/mod"and similar: shall we move these two env variables in theDockerfile? Sotools/docker-build.shgets leaner.- Let's update the
Dockerfileinstructions in the comments to point to this newer shell script!
Contributor
Author
There was a problem hiding this comment.
-v ff7_build:/ff7/build: useful to produce the binaries on the host
In the original PR I've opted for mounting the build directory to the one in the project root on the host, it made it very easy to test built images, but this works too.
CLAUDE.md
Outdated
| @@ -0,0 +1,360 @@ | |||
| ## FF7 Decomp: Working Notes for Agents | |||
Owner
There was a problem hiding this comment.
Let's not have the agent instructions merged in main for now (see feedback here: #17 (comment))
Xeeynamo
approved these changes
Jan 6, 2026
Owner
Xeeynamo
left a comment
There was a problem hiding this comment.
Looks good, thanks! And sorry for the late review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This script creates a cache for Go modules, significantly speeding up the Docker build (from ~40 seconds to ~3s)