Skip to content

feat: add explicit docker cleanup script retention#798

Merged
exKAZUu merged 7 commits into
mainfrom
feat/improve-docker-helper-scripts
May 20, 2026
Merged

feat: add explicit docker cleanup script retention#798
exKAZUu merged 7 commits into
mainfrom
feat/improve-docker-helper-scripts

Conversation

@exKAZUu
Copy link
Copy Markdown
Member

@exKAZUu exKAZUu commented May 20, 2026

Summary

  • update cleanup.sh to accept --keep-scripts
  • keep plain bash ./bash/cleanup.sh as the final cleanup path that removes the copied ./bash helper directory
  • remove unused ASDF helper scripts from generated Docker helpers

Why

  • downstream Dockerfiles sometimes need apt cleanup before later generated helpers such as configure-yarn.sh
  • the cleanup behavior should be visible in the Dockerfile command instead of relying on WB_KEEP_DOCKER_SCRIPTS
  • unused helper scripts add noise to generated dist/bash output

Testing

  • bash -n packages/wb/docker/bash/cleanup.sh
  • rg "install-asdf\\.sh|prepare-asdf.*\\.sh|prepare-asdf\\.sh" packages/wb packages/wbfy -g '!node_modules' -g '!dist'
  • checked local WillBooster / WillBoosterLab Dockerfiles for helper usage
  • yarn verify

exKAZUu and others added 4 commits May 20, 2026 18:30
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a cleanup.sh script designed to optimize Docker images by purging unnecessary packages and removing build-time scripts. The review feedback highlights that the apt-get purge command should be wrapped in a conditional block to respect the --keep-scripts flag, preventing the removal of tools like curl and wget when they are still needed for subsequent build steps. Additionally, the feedback suggests including git in the purge list and refactoring the brittle directory name check to ensure the script directory is reliably removed even if renamed.

Comment thread packages/wb/docker/bash/cleanup.sh
Comment thread packages/wb/docker/bash/cleanup.sh
exKAZUu and others added 3 commits May 20, 2026 20:27
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
@exKAZUu exKAZUu merged commit 39f1dcc into main May 20, 2026
6 checks passed
@exKAZUu exKAZUu deleted the feat/improve-docker-helper-scripts branch May 20, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant