📜 Custom Scripts Configuration

Configure custom entry point scripts and lifecycle hook scripts for Stage-1 and Stage-2 sequential image builds.

🚀 Stage-1 Entry Point
Set Custom Entry Point for Stage-1
Override the default entry point with a custom script
🏁 Stage-2 Entry Point
Set Custom Entry Point for Stage-2
Override the stage-1 entry point for Stage-1 containers
âš ī¸ Important: Stage-2 entry point will completely replace the Stage-1 entry point.
🔧 Stage-1 Custom Scripts
Configure Stage-1 Custom Scripts
Add lifecycle hook scripts for Stage-1 container events
Path to script file with optional command-line arguments
💡 Tip: Press Enter with empty path to finish current script type and move to the next one.
Current Stage-1 Scripts
đŸ—ī¸ on_build scripts:
stage-1/custom/setup.sh --verbose
install-dependencies.sh (inline script)
🚀 on_first_run scripts:
No scripts configured
🔄 on_every_run scripts:
stage-1/scripts/health-check.sh
👤 on_user_login scripts:
No scripts configured
đŸŽ¯ Stage-2 Custom Scripts
Configure Stage-2 Custom Scripts
Add additional scripts for Stage-2 image building
📋 Scripts Execution Summary
Script Execution Timeline
# 1. During Image Building (on_build)
RUN stage-1/custom/setup.sh --verbose
# 2. First Container Start (on_first_run)
# No scripts configured
# 3. Every Container Start (on_every_run)
./stage-1/scripts/health-check.sh
# 4. User SSH Login (on_user_login)
# No scripts configured
Script Descriptions
đŸ—ī¸ on_build: Scripts executed during Stage-1 and Stage-2 image building processes. Useful for installing dependencies, configuring services.
🚀 on_first_run: Scripts executed only on the first container startup. Good for initialization tasks.
🔄 on_every_run: Scripts executed every time the container starts. Ideal for health checks, service restarts.
👤 on_user_login: Scripts executed when a user logs in via SSH. Perfect for setting up user environment.
📁 Script File Management
â€ĸ All script files will be copied to the project directory during configuration save
â€ĸ Script paths in user_config.yml will be relative to the project directory
â€ĸ Ensure all scripts have proper execute permissions before adding them
â€ĸ Test scripts independently before integrating them into the container lifecycle