đ 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